Fixed a stupid error when working out x2 and y2