Add error handling to Activate and Deactivate