Fix pyHook hang