diff --git a/Villefort.cabal b/Villefort.cabal
--- a/Villefort.cabal
+++ b/Villefort.cabal
@@ -1,5 +1,5 @@
 name:                Villefort
-version:             0.1.1.1
+version:             0.1.1.2
 synopsis: Villefort is a task manager and time tracker written in haskell.
 description: Villefort is a browser based time tracker.
 homepage:            https://github.com/Chrisr850/Villefort#readme
diff --git a/src/Villefort/Database.hs b/src/Villefort/Database.hs
--- a/src/Villefort/Database.hs
+++ b/src/Villefort/Database.hs
@@ -23,9 +23,12 @@
 path' :: IO FilePath
 path' = do
   args <- getArgs
-  if args !! 0 == "--custom"
+  if length args > 1 then
+    if args !! 0 == "--custom"
     then return $ args !! 1
     else getDataDir
+    else getDataDir
+    
 
 getDb :: IO Connection  
 getDb =  (++ "/data/todo.db") <$> path' >>= \path ->  connectSqlite3 path
diff --git a/src/Villefort/Server.hs b/src/Villefort/Server.hs
--- a/src/Villefort/Server.hs
+++ b/src/Villefort/Server.hs
@@ -23,6 +23,7 @@
 import System.FilePath
 import System.Posix.Process
 import Paths_Villefort
+
 getWeeks :: IO [[[Char]]]
 getWeeks = do
   rawSql <- makeQuery "select id, Title from weeks where state = 1 order by Title"
