fixed the record counter