fix repeat count issue