Fixed uninitialized variable issues