Fix do_readline checks, so the history is added to readline