skip_samples shouldn't be negative. But it's not enforced because it is an int field. Changed the condition to equality. Added an assert where skip_samples is populated.