fixed globalToLocal