Fixed timer to work properly.