diff --git a/indexation.cabal b/indexation.cabal
--- a/indexation.cabal
+++ b/indexation.cabal
@@ -1,5 +1,5 @@
 name: indexation
-version: 0.5
+version: 0.5.0.1
 category: Data
 synopsis: Tools for entity indexation
 description: A set of tools for indexing entities
diff --git a/library/Indexation/Types.hs b/library/Indexation/Types.hs
--- a/library/Indexation/Types.hs
+++ b/library/Indexation/Types.hs
@@ -5,7 +5,7 @@
 import qualified Data.HashTable.IO as HashtablesIO
 
 
-data Indexer entity = Indexer {-# UNPACK #-} !(IORef Int) {-# UNPACK #-} !(HashtablesIO.CuckooHashTable entity Int)
+data Indexer entity = Indexer {-# UNPACK #-} !(IORef Int) {-# UNPACK #-} !(HashtablesIO.BasicHashTable entity Int)
 
 data IndexTable entity = IndexTable {-# UNPACK #-} !Int {-# UNPACK #-} !(HashMap entity Int)
 
diff --git a/library/Indexation/Vector.hs b/library/Indexation/Vector.hs
--- a/library/Indexation/Vector.hs
+++ b/library/Indexation/Vector.hs
@@ -7,6 +7,7 @@
 import qualified Data.HashMap.Strict as HashMap
 import qualified DeferredFolds.UnfoldM as UnfoldM
 import qualified Data.HashTable.IO as HashtablesIO
+import qualified Data.HashTable.Class as HashtablesClass
 
 
 {-|
@@ -35,12 +36,13 @@
 {-# INLINE indexHashMapWithSize #-}
 indexHashMapWithSize :: Int -> HashMap element Int -> Vector element
 indexHashMapWithSize size hashMap =
-  unsafePerformIO $ do
-    mv <- MutableVector.unsafeNew size
-    let
-      step () element index = unsafeDupablePerformIO (MutableVector.write mv index element)
-      !() = HashMap.foldlWithKey' step () hashMap
-      in freeze mv
+  runST $ do
+    mv <- MutableVector.new size
+    HashMap.foldrWithKey
+      (\ element index action -> MutableVector.write mv index element >> action)
+      (return ())
+      hashMap
+    freeze mv
 
 {-# NOINLINE unfoldM #-}
 unfoldM :: Monad m => Int -> UnfoldM m (Int, element) -> m (Vector element)
@@ -53,7 +55,7 @@
       !iv <- return (unsafeDupablePerformIO (unsafeFreeze mv))
       return iv
 
-hashTable :: Int -> HashtablesIO.CuckooHashTable element Int -> IO (Vector element)
+hashTable :: HashtablesClass.HashTable t => Int -> HashtablesIO.IOHashTable t element Int -> IO (Vector element)
 hashTable size hashTable = do
   mv <- MutableVector.unsafeNew size
   flip HashtablesIO.mapM_ hashTable $ \ (element, index) -> MutableVector.write mv index element
