tidy up deffered code
tidy up when no schedule found