fixing new offset counter to reduce duplicates