segmentation fault fix-bug in parser