Fixed an issue with html pages that only contain images and no text causing errors while switching chapters.