bug fix(segmentation fault)