fix a bug to readline