Merge "Fix memory corruption if increaseSamplingN is not called"