Added activate and deactive hooks.
Fixed bug.