Fixing X/Y coordinates problem