fixed CR line handling