fixed handling of line endings on Windows