fix readlines issue