fix find pid and destroy funcs on mach