fixed Valgrind warning