handle carriage returns correctly.