Fixed bug in unschedule.