diff --git a/modules/h5peditor/src/Plugin/Field/FieldWidget/H5PEditorWidget.php b/modules/h5peditor/src/Plugin/Field/FieldWidget/H5PEditorWidget.php
index 725df46..e125668 100644
--- a/modules/h5peditor/src/Plugin/Field/FieldWidget/H5PEditorWidget.php
+++ b/modules/h5peditor/src/Plugin/Field/FieldWidget/H5PEditorWidget.php
@@ -145,13 +145,37 @@ class H5PEditorWidget extends H5PWidgetBase {
       $content['id'] = $value['id'];
     }
 
-    // Save the new content
-    $return_value['h5p_content_id'] = $core->saveContent($content);
+    if (isset($content['id'])) {
+      $return_value['h5p_content_id'] = $core->h5pF->updateContent($content);
+    }
+    else {
+      $return_value['h5p_content_id'] = $core->h5pF->insertContent($content);
+    }
+
+    // Do a checksum on the params. Only reset user data if the H5P content is
+    // different.
+    $h5p_changed = md5(serialize($old_params)) !== md5(serialize($params->params));
+
+    // Some user data for content has to be reset when the content changes.
+    if ($h5p_changed) {
+      $core->h5pF->resetContentUserData($return_value['h5p_content_id']);
+    }
 
     // If we had existing content and did a new revision we need to make a copy
     // of the content folder from the old revision
     if ($value['id'] && ($do_new_revision || $value['new_translation'])) {
       $core->fs->cloneContent($value['id'], $return_value['h5p_content_id']);
+
+      // If H5P form has not changed and there is a new revision then update
+      // any existing user data with the latest content id.
+      if (!$h5p_changed && $value['id'] != $return_value['h5p_content_id']) {
+        db_update('h5p_content_user_data')
+          ->fields(array(
+            'content_main_id' => $return_value['h5p_content_id']
+          ))
+          ->condition('content_main_id', $value['id'])
+          ->execute();
+      }
     }
 
     // Keep new files, delete files from old parameters
