fixes to scheduling