fix orientation by swapping x and y coords