diff --git a/diceware/config.py b/diceware/config.py
index e76715a543fc9ea7de5b931ab788d438162263ee..89efc85bdc3ace3dd9118410a4d04ee0890f5df4 100644
--- a/diceware/config.py
+++ b/diceware/config.py
@@ -68,9 +68,9 @@ def get_config_dict(path_list=None):
     """
     result = dict(OPTIONS_DEFAULTS)
     found, parser = get_configparser(path_list)
-    if 'diceware' not in parser.sections():
+    if not parser.has_section("diceware"):
         return result
-    conf = parser['diceware']
+    conf = dict(parser.items('diceware'))
     for key, val in OPTIONS_DEFAULTS.items():
         result[key] = conf.get(key, val)
     return result