corrected some errors in parsing