Fixed the way the captions were being added wrapped in html elements