diff --git a/metatag.install b/metatag.install
index 5bc23d1..6527f49 100644
--- a/metatag.install
+++ b/metatag.install
@@ -905,7 +905,7 @@ function metatag_update_7014() {
  */
 function metatag_update_7015() {
   // Tell update 7016 that it isn't needed.
-  variable_set('metatag_skip_update_7016', TRUE);
+  variable_set('metatag_skip_update_7017', TRUE);
 
   // Add the new field.
   db_add_field('metatag', 'revision_id', array(
@@ -927,10 +927,18 @@ function metatag_update_7015() {
 }
 
 /**
- * The {metatag}.revision_id field is required.
+ * Update the revision ID to fix the NULL values, help avoid problems with
+ * update 7017.
  */
 function metatag_update_7016() {
-  if (!variable_get('metatag_skip_update_7016', FALSE)) {
+  db_query("UPDATE {metatag} SET revision_id = 0 WHERE revision_id IS NULL");
+}
+
+/**
+ * The {metatag}.revision_id field is required.
+ */
+function metatag_update_7017() {
+  if (!variable_get('metatag_skip_update_7017', FALSE)) {
     // Let's add a temporary unique key so MySQL will let it go.
     db_add_unique_key('metatag', 'temp_key', array('entity_type', 'entity_id', 'revision_id', 'language'));
     
@@ -959,5 +967,5 @@ function metatag_update_7016() {
   }
 
   // Delete the temporary variable.
-  variable_del('metatag_skip_update_7016');
+  variable_del('metatag_skip_update_7017');
 }
