restore the original method.