Fix uninitialized memory crash