fixed some valgrind issues