Fix handling of pages that have no image and better handle thrown exceptions.