fixed bug on schedules