fixed readline issue