fixing read error