Fixed the initialization of a variable that may be uninitialized in certain corner cases.

Thanks to Shirish for pointing out!

Closes #290