Fixed a crash for non-square images in the "surface" tab