better output
fix error detected by valgrind