Fix usage of uninitialized memory