added app deactivation