Sometimes, wide-angle lenses distort. buildings or other elements on the edges, that even automatic lens distortion function in lightroom can't remove it. So more detailed corrections are needed in Photoshop.
I will show you how to fix this on this photo “Zaton” by user Mirana from slo-foto.net photo community.
Here's the original photo, where the church tower is bent inwards way to much.
When you open the image in Photoshop duplicate the (Layer) with ctrl (control) and J on your keyboard,
because we will performed all changes on that layer.
Select the area around church or other elements with. laso, tool.
Then press ctrl (control) and T, so that the selected part transforms into free transform rectangle (-)
Move with mouse to one of the corner points of the rectangle and turn it in the desired direction until the church tower is aligned. All eight points on free transform rectangle are editable, and can be moved in all directions.
The last step is most complex and time-consuming, we must hide imperfections, along the edges of the new tower and Church position. We do that with Clone Stamp Tool. We place our brush , near the new edge so that we can sample the part of the sky, we do that by pressing ALT and left mouse button. Now that we chose the part of the sky, we start to paste it all around the edge so that we hide bad edges, which arose by turning the tower and the Church. We must sample and paste the same patterns, located around new tower position, so that they blend with the background.
Here is the corrected photo