patching wrong function