332 deactivation feature

Implements #332.