diff --git a/Setup.lhs b/Setup.lhs
--- a/Setup.lhs
+++ b/Setup.lhs
@@ -7,7 +7,7 @@
 > import System.Directory
 > import System.IO
 > import Control.Monad
-> import Text.Regex
+> import Data.List
 >
 > main = defaultMainWithHooks (simpleUserHooks { postCopy = myPostCopy, postInst = myPostInst } )
 >
@@ -39,8 +39,15 @@
 >   let userConfigTemplate = datadir copyDirs </> "etc" </> "bluetilerc_user_template"
 >   let pathToSystemConfig = datadir installDirs </> "etc" </> "bluetilerc"
 >   contents <- readFileStrict userConfigTemplate
->   let contentsPatched = subRegex (mkRegex "__PATH_TO_BLUETILERC__") contents pathToSystemConfig
+>   let contentsPatched = replaceStr "__PATH_TO_BLUETILERC__" pathToSystemConfig contents
 >   writeFile userConfigTemplate contentsPatched
+>
+> replaceStr :: (Eq a) => [a] -> [a] -> [a] -> [a]
+> replaceStr _ _ [] = []
+> replaceStr old new xs@(y:ys) =
+>   case stripPrefix old xs of
+>       Nothing -> y : replaceStr old new ys
+>       Just ys' -> new ++ replaceStr old new ys'
 >
 > -- taken from System.IO.Strict on Hackage
 > readFileStrict :: FilePath -> IO String
diff --git a/bluetile.cabal b/bluetile.cabal
--- a/bluetile.cabal
+++ b/bluetile.cabal
@@ -1,5 +1,5 @@
 Name:                bluetile
-Version:             0.5.1
+Version:             0.5.2
 homepage:            http://www.bluetile.org/
 synopsis:            full-featured tiling for the GNOME desktop environment
 description:
