Fix bug where timer reset to zero every second