Fix read of uninitialized memory (thanks Valgrind!).