Remove trailing \r\n