The sample x64 leave function hook I posted a few weeks ago had some bugs; I've updated the zip file with the corrected version.