Fixes wrong weight middle array nbsample correction