fix repair bug