Fix bug in timer class with repeating timer triggering on refresh