diff --git a/appinfo/app.php b/appinfo/app.php
index b21c7ea..2617fb9 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -21,7 +21,7 @@
*
*/
-require_once('apps/user_sql/user_sql.php');
+require_once __DIR__ . '/../user_sql.php';
\OCP\App::registerAdmin('user_sql','settings');
$backend = new \OCA\user_sql\OC_USER_SQL;
diff --git a/appinfo/info.xml b/appinfo/info.xml
index fd74bdd..b927038 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -15,6 +15,6 @@
auth
-
+
diff --git a/lib/helper.php b/lib/helper.php
index 8964ef9..e6d6d23 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -225,7 +225,7 @@ class Helper {
public function connectToDb($settings)
{
$this -> settings = $settings;
- $cm = new \OC\DB\ConnectionFactory();
+ $cm = new \OC\DB\ConnectionFactory(\OC::$server->getConfig());
$parameters = array('host' => $this -> settings['sql_hostname'],
'password' => $this -> settings['sql_password'],
'user' => $this -> settings['sql_username'],