Fix for errors trying to view next page of images