fix valgrind stuff