fix takediag of repeat