fix to sort schedules strictly