fixed bug in segment cropper: problem generating n-dimensional bitmasks