TST: more fixes on exit cleanup