fixing trouble with \r\n vs \n