Fix to the case when ALL iamges on the last page are deleted.