fixed bug in schedule