fix inverted image