Fixed some more bugs with the scheduling system.