fix record counter not reset