fix readline issue