remove trailing cr