fixing rendering issue with using html in templates