fixed issue 1862, readline problem in cpdb, thanks  kmelevskiy