fix readline behavior