repair fab function.