FIX: Crash when altering schedules in some particular circumstances.