fix repeat bug