i finally had a chance to look at the battery yesterday, it turned out that the screw that holds down the down positive terminal was loose. The screw almost fell from the top when I removed the seat. Tightened it and rode for another half hour with no problem. Hopefully that's the reason why the bike was acting weird. Thanks for all the advices.