Think this should be the other way around: before => onPostActivate and after => onPreDeactivate