diff --git a/ghc-check.cabal b/ghc-check.cabal
--- a/ghc-check.cabal
+++ b/ghc-check.cabal
@@ -1,7 +1,7 @@
 cabal-version:       1.20
 build-type:          Simple
 name:                ghc-check
-version:             0.5.0.2
+version:             0.5.0.3
 synopsis:            detect mismatches between compile-time and run-time versions of the ghc api
 description:         detect mismatches between compile-time and run-time versions of the ghc api
 bug-reports:         https://github.com/pepeiborra/ghc-check/issues
diff --git a/src/GHC/Check.hs b/src/GHC/Check.hs
--- a/src/GHC/Check.hs
+++ b/src/GHC/Check.hs
@@ -35,13 +35,15 @@
 import Data.Version (Version)
 import GHC (Ghc)
 import GHC.Check.Executable (getGhcVersion, guessExecutablePathFromLibdir)
-import GHC.Check.PackageDb (fromVersionString, PackageVersion (..), getPackageVersion, version)
+import GHC.Check.PackageDb (PackageVersion (..), getPackageVersion, version)
 import GHC.Check.Util (gcatchSafe, liftTyped)
 import Language.Haskell.TH (TExpQ, runIO)
 import System.Directory (doesDirectoryExist, doesFileExist)
 
 #if USE_PACKAGE_ABIS
 import GHC (getSessionDynFlags, runGhc, setSessionDynFlags)
+#else
+import GHC.Check.PackageDb (fromVersionString)
 #endif
 
 -- | Given a run-time libdir, checks the ghc installation and returns
diff --git a/src/GHC/Check/PackageDb.hs b/src/GHC/Check/PackageDb.hs
--- a/src/GHC/Check/PackageDb.hs
+++ b/src/GHC/Check/PackageDb.hs
@@ -68,4 +68,4 @@
 fromPackageConfig p = PackageVersion (MyVersion $ packageVersion p) (Just $ abiHash p)
 
 fromVersionString :: HasCallStack => String -> PackageVersion
-fromVersionString v = PackageVersion (MyVersion $ read v) Nothing
+fromVersionString v = PackageVersion (read v) Nothing
