minor improvements in SampleStaGeneric