remove ending line breaks