make valgrind happy when running tests (cleanup)