adapt to CommandHook API change