fixing carriage return bug