fixed usage of uninitialized variable