update metadata only if the hook is active