diff --git a/WebIdeConfig/Manager.inc b/WebIdeConfig/Manager.inc
index 7e5bf4d..b42555a 100644
--- a/WebIdeConfig/Manager.inc
+++ b/WebIdeConfig/Manager.inc
@@ -85,7 +85,12 @@ class Manager {
   public static function initialize($args) {
     self::$stdout = fopen('php://stdout', 'w');
     self::$stderr = fopen('php://stderr', 'w');
-    self::$userHome = $_SERVER['HOME'];
+    if (isset($_SERVER['HOME'])) {
+      self::$userHome = $_SERVER['HOME'];
+    }
+    else if (isset($_SERVER['USERPROFILE'])) {
+      self::$userHome = $_SERVER['USERPROFILE'];
+    }
     self::initializeOS();
     self::initializeSelfHome();
     self::$packageRoots[] = self::$selfHome;
@@ -110,7 +115,7 @@ class Manager {
    *   One of the self::OS_*.
    */
   protected static function initializeOS() {
-    if (strpos(PHP_OS, 'Win') !== FALSE) {
+    if (substr(PHP_OS, 0, 3) == 'WIN') {
       self::$OS = self::OS_WINDOWS;
     }
     elseif (strpos(PHP_OS, 'Linux') !== FALSE) {
diff --git a/WebIdeConfig/Plugin/Component/ConfigFile.inc b/WebIdeConfig/Plugin/Component/ConfigFile.inc
index 40c5345..38ab46a 100644
--- a/WebIdeConfig/Plugin/Component/ConfigFile.inc
+++ b/WebIdeConfig/Plugin/Component/ConfigFile.inc
@@ -93,6 +93,9 @@ class ConfigFile {
       if ($this->existsInWebIde() XOR $this->existsInConfigHome()) {
         $this->identical = FALSE;
       }
+      else if (is_dir($this->fullPathWebIde) || is_dir($this->fullPathConfigHome)) {
+        $this->identical = TRUE;
+      }
       else {
         $this->identical = (file_get_contents($this->fullPathWebIde) == file_get_contents($this->fullPathConfigHome));
       }
