fix for line sep '\n' or '\r' or '\r\n'