Fix access to uninitialized variable