Improved coordinate handling