deal with segmentation fault, try add gc