Fix bug that prevented captions for images from appearing