bug fix - segmentation fault detection