#96 fix valgrind problem