diff --git a/hpc-coveralls.cabal b/hpc-coveralls.cabal
--- a/hpc-coveralls.cabal
+++ b/hpc-coveralls.cabal
@@ -1,5 +1,5 @@
 name:           hpc-coveralls
-version:        0.1.0
+version:        0.1.2
 synopsis:       Coveralls.io support for Haskell.
 description:
   This utility converts and sends Haskell projects hpc code coverage to <http://coveralls.io/ coverall.io>.
diff --git a/src/Trace/Hpc/Coveralls.hs b/src/Trace/Hpc/Coveralls.hs
--- a/src/Trace/Hpc/Coveralls.hs
+++ b/src/Trace/Hpc/Coveralls.hs
@@ -70,7 +70,11 @@
     sources <- mapM readSource mixs
     return $ zip3 sources mixs tixs
     where readMix' tix = readMix [mixPath] (Right tix)
-          mixPath = mixDir ++ name ++ "/"
+              where mixPath = mixDir ++ dirName ++ "/"
+                    dirName = case span (/= '/') modName of
+                       (_, []) -> name
+                       (packageId, _) -> packageId
+                    TixModule modName _ _ _ = tix
           readSource (Mix filePath _ _ _ _) = readFile filePath
 
 -- | Generate coveralls json formatted code coverage from hpc coverage data
