Fixed bug in reschedule-at-midnight.
Previously rescheduled many times at midnight.