Fixed the problem where the timer only gets executed once.