Added a deactivate block and fixed remove