Fix a problem while fetching multiple pages from a gallery.