Default Phone acting weird, anyone have a solution?

First of all, my phone is running jellybomb version 2, freeza beastmode kernel 2.0 and cpu running at 2.7. I've never had problems before until one day I downloaded a file that had a virus, so I decided to do a restore using twrp. The restore failed and my phone and it got screwed, I've tried several methods to get it running again and I finally found the solution. I flashed the brickbug file and it was fixed. Now I noticed that sometimes when I restart the phone, it won't restart, it just powers off. There are also times when my phone just blacks out and freezes and I have to do a battery pull. There are also incidents where after boot up from a restart or battery pull, my touch screen won't respond. It's really weird. I dirty flashed to jellybomb version 2 from version 1, I doubt that's the issue since these problems started happening after I flashed brickbug to fix my phone. Anyone know what could be wrong or a fix? It's not a huge issue since my phone works fine most of the time, but it gets a bit annoying when the problem does happen. Last resort would be wipe absolutely everything and start over..

Sent from my SM-N900P using XDA Premium 4 mobile app