fix register_uninstall_hook was called incorrectly