Move deactivating to a command