Fix schedule_create(), dont use the schedule struct before its been allocated and remove the assert since its pointless because we already checked the schedule pointer. Fix schedule_cleanup(), do not use schedule->allocator after we have deallocated the schedule struct.