Fixed template breaking due to newline at EOF