restore config first and patch after this