Perhaps buggy fix to scheduling