changed patch: use of alias_method_chain for method hooking