Deactivate app on prefs window close (minor update).