Fixed valgrind leak