diff --git a/section.install b/section.install
index b16ee7e..ae0820e 100644
--- a/section.install
+++ b/section.install
@@ -40,6 +40,12 @@ function section_schema() {
         'length' => 128,
         'not null' => TRUE,
       ),
+      'alias' => array(
+        'description' => 'The URL alias of this section.',
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => FALSE,
+      ),
       'status' => array(
         'type' => 'int',
         'not null' => TRUE,
@@ -186,4 +192,18 @@ function section_schema() {
   );
 
   return $schema;
+}
+
+
+/**
+ * Add path field. 
+ */
+function section_update_7101() {
+    $field = array(
+      'description' => 'The URL alias of this section.',
+      'type' => 'varchar',
+      'length' => 255,
+      'not null' => FALSE,
+    );
+    db_add_field('section', 'alias', $field);
 }
\ No newline at end of file
diff --git a/section.module b/section.module
index 05c890c..fb620b4 100644
--- a/section.module
+++ b/section.module
@@ -663,7 +663,20 @@ function section_delete_multiple($sids) {
 }
 
 /**
- *
+ * Implements hook_entity_presave(). 
+ */
+function section_entity_presave($entity, $type) {
+  if ($type == 'section') {
+    if (isset($entity->path)) {
+      // Save the alias.
+      $entity->alias = trim($entity->path['alias']);
+      $test = entity_uri($type, $entity);
+    }
+  }
+}
+
+/**
+ * Implements hook_entity_insert().
  */
 function section_entity_insert($entity, $type) {
   if ($type !== 'section') {
@@ -671,13 +684,23 @@ function section_entity_insert($entity, $type) {
   }
 
   if (module_exists('path')) {
+    // If we don't have a path specified, it probably means that we are exporting
+    // an entity from code. Let's create the path array.
+    if (isset($entity->alias) && !isset($entity->path)) {
+      $entity->path = array(
+        'pid' => NULL,
+        'source' => 'section/' . $entity->name,
+        'alias' => $entity->alias,
+        'language' => LANGUAGE_NONE,  
+      );
+    }
     if (isset($entity->path)) {
       $path = $entity->path;
       $path['alias'] = trim($path['alias']);
       // Only save a non-empty alias.
       if (!empty($path['alias'])) {
         // Ensure fields for programmatic executions.
-        $path['source'] = 'section/' . $entity->sid;
+        $path['source'] = 'section/' . $entity->name;
         $path['language'] = LANGUAGE_NONE;
         path_save($path);
       }
