Fixed bug where tasks on the second day could not be scheduled