Fixes coordinate conversion