Improve and fix bugs with timer to next update