Fix indices in the parser