Before hook.