Modified how errors are returned when parsing