Fix random subsetting