fixed bad reading errors