Added a before assign hook.