Fixing deactivate tests.

Fixes 357.