Fix typos, use \Exception and prohibit deactivati…

vation if other apps depend on the deactivated one