bug fixes for spatial and groupby; threshold for groupby