fix readline check