fixed several issues with missing metadata and custom html (scripts and images)