fix issue #993 and fix Windows Lineendig (CRLF)