starting to fix up over-aggressive at-exit cleanup