need to fix some bugs in parser_core.c