fixed readline problem