Fix bug when page number isn't in the image list