fixing null collapse in parser