Small code fix.
Fix time not stopping at the end bug.