fix empty string read error