diff --git a/roots.cpp b/roots.cpp
index e98dfd4..c4afd5d 100644
--- a/roots.cpp
+++ b/roots.cpp
@@ -260,8 +260,6 @@
           if (result == 0 && directory != nullptr) {
             const char* e2fsdroid_argv[] = { "/sbin/e2fsdroid_static",
                                              "-e",
-                                             "-S",
-                                             "/file_contexts",
                                              "-f",
                                              directory,
                                              "-a",
@@ -270,7 +268,7 @@
                                              nullptr };
 
             result = exec_cmd(e2fsdroid_argv[0], const_cast<char**>(e2fsdroid_argv));
-            }
+          }
         } else {   /* Has to be f2fs because we checked earlier. */
             if (v->key_loc != NULL && strcmp(v->key_loc, "footer") == 0 && length < 0) {
                 LOG(ERROR) << "format_volume: crypt footer + negative length (" << length
diff --git a/screen_ui.cpp b/screen_ui.cpp
index d9574d8..8f792f1 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -301,15 +301,15 @@
   gr_color(0, 0, 0, 255);
   gr_clear();
 
-  static constexpr int TEXT_INDENT = 4;
-  int x = TEXT_INDENT + kMarginWidth;
   int y = kMarginHeight;
   if (show_menu) {
-    std::string recovery_fingerprint =
-        android::base::GetProperty("ro.bootimage.build.fingerprint", "");
+    static constexpr int kMenuIndent = 4;
+    int x = kMarginWidth + kMenuIndent;
 
     SetColor(INFO);
     y += DrawTextLine(x, y, "Android Recovery", true);
+    std::string recovery_fingerprint =
+        android::base::GetProperty("ro.bootimage.build.fingerprint", "");
     for (const auto& chunk : android::base::Split(recovery_fingerprint, ":")) {
       y += DrawTextLine(x, y, chunk.c_str(), false);
     }
@@ -343,7 +343,7 @@
   size_t count = 0;
   for (int ty = gr_fb_height() - kMarginHeight - char_height_; ty >= y && count < text_rows_;
        ty -= char_height_, ++count) {
-    DrawTextLine(x, ty, text_[row], false);
+    DrawTextLine(kMarginWidth, ty, text_[row], false);
     --row;
     if (row < 0) row = text_rows_ - 1;
   }
diff --git a/updater/install.cpp b/updater/install.cpp
index c9a3a07..bfe91e7 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -322,8 +322,7 @@
       return StringValue(location);
     }
 
-    const char* e2fsdroid_argv[] = { "/sbin/e2fsdroid_static", "-e",   "-S",
-                                     "/file_contexts",         "-a",   mount_point.c_str(),
+    const char* e2fsdroid_argv[] = { "/sbin/e2fsdroid_static", "-e",   "-a", mount_point.c_str(),
                                      location.c_str(),         nullptr };
     status = exec_cmd(e2fsdroid_argv[0], const_cast<char**>(e2fsdroid_argv));
     if (status != 0) {
