Added event hooks.