fixed seg fault in sphere segmentation kernel