Fix compiler warning about uninitialized variable

Fixes #1051