diff --git a/java/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtils.java b/java/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtils.java
index 7b81e8b..a2c3ed4 100644
--- a/java/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtils.java
@@ -73,8 +73,8 @@
     @UsedForTesting
     public static void writeDictionary(final DictEncoder dictEncoder,
             final BigramDictionaryInterface dict, final UserHistoryDictionaryBigramList bigrams,
-            final FormatOptions formatOptions) {
-        final FusionDictionary fusionDict = constructFusionDictionary(dict, bigrams);
+            final FormatOptions formatOptions, final HashMap<String, String> options) {
+        final FusionDictionary fusionDict = constructFusionDictionary(dict, bigrams, options);
         fusionDict.addOptionAttribute(USES_FORGETTING_CURVE_KEY, USES_FORGETTING_CURVE_VALUE);
         fusionDict.addOptionAttribute(LAST_UPDATED_TIME_KEY,
                 String.valueOf(TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())));
@@ -92,10 +92,10 @@
      * Constructs a new FusionDictionary from BigramDictionaryInterface.
      */
     @UsedForTesting
-    static FusionDictionary constructFusionDictionary(
-            final BigramDictionaryInterface dict, final UserHistoryDictionaryBigramList bigrams) {
+    static FusionDictionary constructFusionDictionary(final BigramDictionaryInterface dict,
+            final UserHistoryDictionaryBigramList bigrams, final HashMap<String, String> options) {
         final FusionDictionary fusionDict = new FusionDictionary(new PtNodeArray(),
-                new FusionDictionary.DictionaryOptions(new HashMap<String, String>(), false,
+                new FusionDictionary.DictionaryOptions(options, false,
                         false));
         int profTotal = 0;
         for (final String word1 : bigrams.keySet()) {
diff --git a/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java b/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
index 6affe23..dac0dba 100644
--- a/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
+++ b/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
@@ -558,12 +558,12 @@
         dictFile.delete();
     }
 
-    public void testRandomOperetionsAndFlashWithGC() {
-        testRandomOperetionsAndFlashWithGC(3 /* formatVersion */);
-        testRandomOperetionsAndFlashWithGC(4 /* formatVersion */);
+    public void testRandomOperationsAndFlashWithGC() {
+        testRandomOperationsAndFlashWithGC(3 /* formatVersion */);
+        testRandomOperationsAndFlashWithGC(4 /* formatVersion */);
     }
 
-    private void testRandomOperetionsAndFlashWithGC(final int formatVersion) {
+    private void testRandomOperationsAndFlashWithGC(final int formatVersion) {
         final int flashWithGCIterationCount = 50;
         final int operationCountInEachIteration = 200;
         final int initialUnigramCount = 100;
diff --git a/tests/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtilsTests.java
index 660e53e..fc921b4 100644
--- a/tests/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtilsTests.java
@@ -24,6 +24,7 @@
 import com.android.inputmethod.latin.makedict.DictDecoder;
 import com.android.inputmethod.latin.makedict.DictEncoder;
 import com.android.inputmethod.latin.makedict.FormatSpec;
+import com.android.inputmethod.latin.makedict.FormatSpec.FileHeader;
 import com.android.inputmethod.latin.makedict.FusionDictionary;
 import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode;
 import com.android.inputmethod.latin.makedict.UnsupportedFormatException;
@@ -53,6 +54,12 @@
     private static final ArrayList<String> NOT_HAVE_BIGRAM = new ArrayList<String>();
     private static final FormatSpec.FormatOptions FORMAT_OPTIONS = new FormatSpec.FormatOptions(2);
     private static final String TEST_DICT_FILE_EXTENSION = ".testDict";
+    private static final HashMap<String, String> HEADER_OPTIONS = new HashMap<String, String>();
+    static {
+        HEADER_OPTIONS.put(FileHeader.DICTIONARY_LOCALE_ATTRIBUTE, "en_US");
+        HEADER_OPTIONS.put(FileHeader.DICTIONARY_ID_ATTRIBUTE, "test");
+        HEADER_OPTIONS.put(FileHeader.DICTIONARY_VERSION_ATTRIBUTE, "1000");
+    }
 
     /**
      * Return same frequency for all words and bigrams
@@ -140,7 +147,8 @@
     private void writeDictToFile(final File file,
             final UserHistoryDictionaryBigramList bigramList) {
         final DictEncoder dictEncoder = new Ver3DictEncoder(file);
-        UserHistoryDictIOUtils.writeDictionary(dictEncoder, this, bigramList, FORMAT_OPTIONS);
+        UserHistoryDictIOUtils.writeDictionary(dictEncoder, this, bigramList, FORMAT_OPTIONS,
+                HEADER_OPTIONS);
     }
 
     private void readDictFromFile(final File file, final OnAddWordListener listener)
@@ -159,8 +167,8 @@
         addBigramToBigramList("this", "was", addedWords, originalList);
         addBigramToBigramList("hello", "world", addedWords, originalList);
 
-        final FusionDictionary fusionDict =
-                UserHistoryDictIOUtils.constructFusionDictionary(this, originalList);
+        final FusionDictionary fusionDict = UserHistoryDictIOUtils.constructFusionDictionary(
+                this, originalList, HEADER_OPTIONS);
 
         checkWordsInFusionDict(fusionDict, addedWords);
     }
