Parsing: Algorithm fixes