corrected coordinate conversion