fixed some timer bugs