Fixed close button to work with dynamic content.