Bug fix: avoid use of uninitialized variable