Added deactivation and undodeactivation support