Fix scaling of non-square images