fix repeat bugs