added deactivate to entity