bug stemming from old code in SpatialBorderMedian corrected.