fix valgrind complaining about uninitialized memory