Fixed bug with \r in input