diff --git a/block_class.install b/block_class.install
index 491269d..8f16f97 100644
--- a/block_class.install
+++ b/block_class.install
@@ -5,32 +5,29 @@
  * Provides the (un)install and update logic for block_class.
  */
 
-
 /**
  * Implementation of hook_schema().
- *
- * @return array The schema information.
  */
 function block_class_schema() {
   $schema['block_class'] = array(
     'fields' => array(
       'module' => array(
         'type'        => 'varchar',
-        'length'      => '255',
+        'length'      => 64,
         'not null'    => TRUE,
-        'description' => t('The module to which the block belongs.'),
+        'description' => 'The module to which the block belongs.',
       ),
       'delta' => array(
         'type'        => 'varchar',
-        'length'      => '255', 
+        'length'      => 32,
         'not null'    => TRUE,
-        'description' => t("The ID of the module's block."),
+        'description' => "The ID of the module's block.",
       ),
       'css_class' => array(
         'type'        => 'varchar',
-        'length'      => '255',
+        'length'      => 255,
         'not null'    => TRUE,
-        'description' => t('String containing the classes for the block.'),
+        'description' => 'String containing the classes for the block.',
       ),
     ),
     'primary key' => array('module', 'delta'),
@@ -39,7 +36,6 @@ function block_class_schema() {
   return $schema;
 }
 
-
 /**
  * Implementation of hook_install().
  */
@@ -47,7 +43,6 @@ function block_class_install() {
   drupal_install_schema('block_class');
 }
 
-
 /**
  * Implementation of hook_uninstall().
  */
@@ -55,48 +50,76 @@ function block_class_uninstall() {
   drupal_uninstall_schema('block_class');
 }
 
-
 /**
- * Implementation of hook_update_N(). Alters the structure of the
- * block_class schema.
- *
- * @return array The results of the updates.
+ * Alters the structure of {block_class} schema.
  */
 function block_class_update_6100() {
-  $status = array();
+  $ret = array();
 
   // Update the schema.
-  db_drop_primary_key($status, 'block_class');
+  db_drop_primary_key($ret, 'block_class');
 
-  db_change_field($status, 'block_class', 'module', 'module',
+  db_change_field($ret, 'block_class', 'module', 'module',
     array(
       'type' => 'varchar',
       'length' => '255',
       'not null' => TRUE,
-      'description' => t('The module to which the block belongs.'),
+      'description' => 'The module to which the block belongs.',
     )
   );
-
-  db_change_field($status, 'block_class', 'delta', 'delta',
+  db_change_field($ret, 'block_class', 'delta', 'delta',
     array(
       'type' => 'varchar',
       'length' => '255',
       'not null' => TRUE,
-      'description' => t("The ID of the module's block."),
+      'description' => "The ID of the module's block.",
     )
   );
 
-  db_change_field($status, 'block_class', 'css_class', 'css_class',
+  return $ret;
+}
+
+/**
+ * Fix broken db_change_field from 6100
+ */
+function block_class_update_6101() {
+  $ret = array();
+
+  db_change_field($ret, 'block_class', 'css_class', 'css_class',
     array(
       'type' => 'varchar',
-      'size' => '255',
+      'length' => '255',
       'not null' => TRUE,
-      'description' => t('String containing the classes for the block.'),
+      'description' => 'String containing the classes for the block.',
     )
   );
+  return $ret;
+}
 
-  // Restore the primary key.
-  db_add_primary_key($status, 'block_class', array('module', 'delta'));
-
-  return $status;
+/**
+ * Fix too long primary key length in {block_class}.
+ */
+function block_class_update_6102() {
+  $ret = array();
+
+  // Drop current primary key.
+  db_drop_primary_key($ret, 'block_class');
+
+  db_change_field($ret, 'block_class', 'module', 'module', array(
+    'type' => 'varchar',
+    'length' => 64,
+    'not null' => TRUE,
+    'description' => 'The module to which the block belongs.',
+  ));
+  db_change_field($ret, 'block_class', 'delta', 'delta', array(
+    'type' => 'varchar',
+    'length' => 32,
+    'not null' => TRUE,
+    'description' => "The ID of the module's block.",
+  ));
+
+  // Create new primary key.
+  db_add_primary_key($ret, 'block_class', array('module', 'delta'));
+
+  return $ret;
 }
