test _masterDeactivated a bit better, and fix typo
fix pyflakes