segmentation fault caused by new getstrtoken semantics