Reparing patches