Fix bug on timer.