fix delete on exit