nevermind. Figured it out. It was a hardware problem. I was using a dying battery. Switched over to DC adapter power supply and it works good.