Fixed some timer related issues.