diff --git a/cabal2spec.cabal b/cabal2spec.cabal
--- a/cabal2spec.cabal
+++ b/cabal2spec.cabal
@@ -1,5 +1,5 @@
 name:               cabal2spec
-version:            2.2.0
+version:            2.2.1
 synopsis:           Convert Cabal files into rpm spec files
 description:        Convert
                     Cabal files into a
diff --git a/cabal2spec/Main.hs b/cabal2spec/Main.hs
--- a/cabal2spec/Main.hs
+++ b/cabal2spec/Main.hs
@@ -57,4 +57,4 @@
   Options {..} <- execParser pinfo
   let specFile = fromMaybe (optCabalFile `replaceExtension` "spec") optOutputFile
   putStrLn $ "Writing spec file to " ++ show specFile ++ " ..."
-  cabal2spec buildPlatform buildCompilerId (mkFlagAssignment optFlags) optForceExe optRunTests optCabalFile specFile
+  cabal2spec optPlatform optCompiler (mkFlagAssignment optFlags) optForceExe optRunTests optCabalFile specFile
