Added missing sample count reset