more work with valgrind to clean up error reporting