Fixed timings bug

Fixed timings bug causing scheduled tasks to execute at the wrong time.