updated ProcessChar, to allow new lines in shell