diff --git a/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java b/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java
index 10169a8d51..67723e9a74 100644
--- a/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java
+++ b/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java
@@ -90,7 +90,7 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
addPreferencesFromResource(R.xml.pref_closedmode);
if (Config.OPENAPSENABLED)
addPreferencesFromResource(R.xml.pref_openapsma);
- if (MainApp.getSpecificPlugin(OpenAPSAMAPlugin.class).isEnabled(PluginBase.APS))
+ if (MainApp.getSpecificPlugin(OpenAPSAMAPlugin.class) != null && MainApp.getSpecificPlugin(OpenAPSAMAPlugin.class).isEnabled(PluginBase.APS))
addPreferencesFromResource(R.xml.pref_openapsama);
addPreferencesFromResource(R.xml.pref_profile);
if (Config.DANAR) {
diff --git a/wear/wear.iml b/wear/wear.iml
index d38c08321d..f2951e6bcf 100644
--- a/wear/wear.iml
+++ b/wear/wear.iml
@@ -122,6 +122,7 @@
+
@@ -134,10 +135,14 @@
+
+
+
+