diff --git a/domain.module b/domain.module
index 5f6872e..c3f64ed 100644
--- a/domain.module
+++ b/domain.module
@@ -1828,6 +1828,7 @@ function domain_form_alter(&$form, &$form_state, $form_id) {
         $user_domains = array();
         $default_options = array();
         $user_options = array();
+        $raw_options = array();
         if (!empty($user->domain_user)) {
           foreach ($user->domain_user as $key => $value) {
             if (abs($value) > 0) {
@@ -1895,7 +1896,7 @@ function domain_form_alter(&$form, &$form_state, $form_id) {
             );
             // We must preserve publishing options that the user cannot access, but only for
             // existing nodes.
-            if ($form['#node']->nid) {
+            if (!empty($form['#node']->nid)) {
               $raw = $raw_options;
             }
             else {
@@ -1918,7 +1919,7 @@ function domain_form_alter(&$form, &$form_state, $form_id) {
             }
             // Show the options that cannot be changed.
             $list = array();
-            if ($form['#node']->domain_site) {
+            if (!empty($form['#node']->domain_site)) {
               $list[]['data'] = t('All affiliates');
             }
             if (!empty($raw)) {
