Fixed error in pausing and restarting timer