Improve activation/deactivation handling