fix nasty prompt bug with non-printing chars