fixed errors related to parsing data incorrectly