diff --git a/lib/SimpleSAML/Database.php b/lib/SimpleSAML/Database.php
index 28e88c142add05039dd84078a31ba51913fe5e4f..e66288b2d8fbb4307f2eb4babee1ffd1a0daefaf 100644
--- a/lib/SimpleSAML/Database.php
+++ b/lib/SimpleSAML/Database.php
@@ -60,12 +60,12 @@ class Database
         $config = ($altConfig) ? $altConfig : \SimpleSAML_Configuration::getInstance();
         $instanceId = self::generateInstanceId($config);
 
-        /* Check if we already have initialized the session. */
+        // check if we already have initialized the session
         if (isset(self::$instance[$instanceId])) {
             return self::$instance[$instanceId];
         }
 
-        /* Create a new session. */
+        // create a new session
         self::$instance[$instanceId] = new Database($config);
         return self::$instance[$instanceId];
     }
@@ -83,7 +83,7 @@ class Database
             $driverOptions = array(\PDO::ATTR_PERSISTENT => true);
         }
 
-        // Connect to the master
+        // connect to the master
         $this->dbMaster = $this->connect(
             $config->getString('database.dsn'),
             $config->getString('database.username', null),
@@ -91,7 +91,7 @@ class Database
             $driverOptions
         );
 
-        // Connect to any configured slaves
+        // connect to any configured slaves
         $slaves = $config->getArray('database.slaves', array());
         if (count($slaves >= 1)) {
             foreach ($slaves as $slave) {
diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php
index 600eea8ee7d70e4dd877042f85c2a6ecd0315c15..dc08e5cc4309c2c667dcdc74bc178923a96d417c 100644
--- a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php
+++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php
@@ -51,22 +51,18 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerPdo extends SimpleSAML_Metadata_
      * This constructor initializes the PDO metadata storage handler with the specified
      * configuration. The configuration is an associative array with the following
      * possible elements (set in config.php):
-     * - 'usePersistentConnection': TRUE/FALSE if database connection should be
-     *                                persistent.
-     *
-     * - 'dsn':                    The database connection string.
-     *
+     * - 'usePersistentConnection': TRUE/FALSE if database connection should be persistent.
+     * - 'dsn':                     The database connection string.
      * - 'username':                Database user name
-     *
      * - 'password':                Password for the database user.
      *
-     * @param array $config An associtive array with the configuration for this handler.
+     * @param array $config An associative array with the configuration for this handler.
      */
     public function __construct($config)
     {
         assert('is_array($config)');
 
-        $this->db = SimpleSAML\Database::getInstance();
+        $this->db = SimpleSAML\Database::getInstance($config);
     }