Fixed the bug where timer was not reset.