fixes for line breaks in templates