fix bug at read_lines() function