removing incorrect self refs in parser