Added undo deactivate