Fix a potential crash in the parser