bugfix in extension_hook