Fixed issue with coordinate differences