clear whitespace in templates