diff --git a/restws.module b/restws.module
index e078411..8ff2322 100644
--- a/restws.module
+++ b/restws.module
@@ -512,3 +512,44 @@ function restws_terminate_request($status_message = NULL, $message = NULL) {
   drupal_page_footer();
   exit;
 }
+
+
+// https://www.drupal.org/node/1003788
+function restws_menu_get_item_alter(&$router_item, $path, $original_map) {
+  $resources = &drupal_static(__FUNCTION__);
+  if (!isset($resources)) {
+    $info = array_keys(restws_get_resource_info());
+    foreach ($info as $resource) {
+      $resources[] = $resource . '/%';
+    }
+  }
+  // Check if $router_item path needs an updated loader.
+  if (in_array($router_item['path'], $resources)) {
+    $existing = unserialize($router_item['load_functions']);
+    if($existing[1] == 'node_load') {
+      // Add our loader, "1" represents the index of the argument to send to load_arguments callback
+      $router_item['load_functions'] = serialize(array(1 => 'restws_node_resource_load'));
+    }
+
+  }
+}
+
+/**
+ * Loads the entity by identifier and passes it to $router_item['page_callback']
+ * @param $identifier
+ * @param $path
+ * @return bool
+ */
+function restws_node_resource_load($identifier) {
+  $dot = strpos($identifier, '.');
+
+  if ($dot > 0) {
+    $identifier = substr($identifier, 0, $dot);
+  }
+
+  $entity_types = entity_get_info();
+  if (array_key_exists('node', $entity_types)) {
+    $entities = entity_load('node', array($identifier));
+  }
+  return !empty($entities[$identifier]) ? $entities[$identifier] : FALSE;
+}
