Fixed errors with calculating correct bins
fixed errors in segmentation kernel