Fix rotate_schedule bug