Fixed a case where the first row of images might get truncated