deal with segmentation fault, try finding where the bug