Fixed uninitialized position branch

Fixed one if branch that may result in uninitialized position variable