fixed delete of running object on exit