Fix crash on crop caused by miscalculating the aspect ratio.