Get rid of unecessary on_exit callbacks