Added the missing before and after hook.