diff --git a/restws.formats.inc b/restws.formats.inc
index 4d732f6..6c666f3 100644
--- a/restws.formats.inc
+++ b/restws.formats.inc
@@ -331,6 +331,10 @@ abstract class RestWSBaseFormat implements RestWSFormatInterface {
       }
       return reset($ids);
     }
+    else
+    {
+      return $reference;
+    }
 
     throw new RestWSException('Invalid value for resource reference given.', 406);
   }
diff --git a/restws.test b/restws.test
index 06387a1..19d14b0 100644
--- a/restws.test
+++ b/restws.test
@@ -16,7 +16,32 @@ class RestWSTestCase extends DrupalWebTestCase {
   }
 
   public function setUp() {
-    parent::setUp('restws');
+    parent::setUp('restws', 'entity', 'entity_test', 'locale');
+
+    // Create a field having 4 values for testing multiple value support.
+    $this->field_name = drupal_strtolower($this->randomName() . '_field_name');
+    $this->field = array('field_name' => $this->field_name, 'type' => 'text', 'cardinality' => 4);
+    $this->field = field_create_field($this->field);
+    $this->field_id = $this->field['id'];
+    $this->instance = array(
+      'field_name' => $this->field_name,
+      'entity_type' => 'node',
+      'bundle' => 'page',
+      'label' => $this->randomName() . '_label',
+      'description' => $this->randomName() . '_description',
+      'weight' => mt_rand(0, 127),
+      'settings' => array(
+        'text_processing' => FALSE,
+      ),
+      'widget' => array(
+        'type' => 'text_textfield',
+        'label' => 'Test Field',
+        'settings' => array(
+          'size' => 64,
+        )
+      )
+    );
+    field_create_instance($this->instance);
   }
 
   /**
@@ -53,6 +78,25 @@ class RestWSTestCase extends DrupalWebTestCase {
     $this->assertResponse('201', 'HTTP response code is correct.');
     $this->assertEqual(curl_getinfo($this->curlHandle, CURLINFO_CONTENT_TYPE), 'application/json', 'HTTP content type is correct.');
 
+    // Test Create node with multi value field.
+    $multivaluefield = array(array('value' => $this->randomName(8),), array('value' => $this->randomName(8),), array('value' => $this->randomName(8),), array('value' => $this->randomName(8),));
+    $new_node = array(
+      'body'      => array(LANGUAGE_NONE => array(array())),
+      'title'     => $title,
+      'type'      => 'page',
+      'author'    => $account->uid,
+      $this->field_name => $multivaluefield,
+    );
+    $json = drupal_json_encode($new_node);
+    $result = $this->httpRequest('node', 'POST', $account, $json);
+    $result_array = drupal_json_decode($result);
+    $nid = $result_array['id'];
+    $node2 = node_load($nid);
+    $this->assertEqual($multivaluefield[0]['value'], $node2->{$this->field_name}['und'][0]['value'], 'Multi-value field from DB is equal to the new multi-value field. Value 1.');
+    $this->assertEqual($multivaluefield[1]['value'], $node2->{$this->field_name}['und'][1]['value'], 'Multi-value field from DB is equal to the new multi-value field. Value 2.');
+    $this->assertResponse('201', 'HTTP response code is correct.');
+    $this->assertEqual(curl_getinfo($this->curlHandle, CURLINFO_CONTENT_TYPE), 'application/json', 'HTTP content type is correct.');
+
     // Test Update.
     $new_title = $this->randomName(8);
     $json = drupal_json_encode(array('title' => $new_title));
