fixed error with unequal sample size filter statement