counting newlines seems to be hard (fix one EOL to much)