Fixed z coordinates returning x coordinates

Z coordinates are also erroneously listed as 'Y' coordinates but I didn't change that as it might break things