Fix errors in parsing