normalized indentation and fixed head tag not being closed