keep newline in the end of headers, update tests