Fix using uninitialized memory (Bug #994)