Fixed bug in repl buffer when inserting character or string.