diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/FieldTranslationSynchronizer.php b/core/modules/translation_entity/lib/Drupal/translation_entity/FieldTranslationSynchronizer.php
index 8137dd4..94e80ec 100644
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/FieldTranslationSynchronizer.php
+++ b/core/modules/translation_entity/lib/Drupal/translation_entity/FieldTranslationSynchronizer.php
@@ -164,11 +164,11 @@ public function synchronizeField(array &$field_values, array $unchanged_items, $
             $field_values[$langcode][$delta] = $source_items[$delta];
           }
           // Otherwise the current item might have been reordered.
-          elseif ($old_delta >= 0 && $new_delta >= 0) {
+          elseif (isset($old_delta) && isset($new_delta)) {
             // If for any reason the old value is not defined for the current
             // language we fall back to the new source value, this way we ensure
             // the new values are at least propagated to all the translations.
-            // If the value have only been reordered we just move the old one in
+            // If the value has only been reordered we just move the old one in
             // the new position.
             $item = isset($original_field_values[$langcode][$old_delta]) ? $original_field_values[$langcode][$old_delta] : $source_items[$new_delta];
             $field_values[$langcode][$new_delta] = $item;
@@ -200,7 +200,7 @@ protected function itemHash(array $items, $delta, array $columns) {
           $value = $items[$delta][$column];
           // String and integer values are by far the most common item values,
           // thus we special-case them to improve performance.
-          $values[] = is_string($value) || is_int($value) ? $value : md5(serialize($value));
+          $values[] = is_string($value) || is_int($value) ? $value : hash('sha256', serialize($value));
         }
         else {
           // Explicitly track also empty values.
