Fixed bug with resetting maxTime