v1.3.23 better fix for transform_sample_counts, and most tests