fixing coordonnates inversion