--- a/src/qtgui/restable.cpp
+++ b/src/qtgui/restable.cpp
@@ -19,6 +19,7 @@
 #include <QTextDocument>
 #include <QPainter>
 
+#include "recoll.h"
 #include "refcntr.h"
 #include "docseq.h"
 #include "debuglog.h"
@@ -84,7 +85,7 @@
 string ResTablePager::iconPath(const string& mtype)
 {
     string iconpath;
-    RclConfig::getMainConfig()->getMimeIconName(mtype, &iconpath);
+    rclconfig->getMimeIconName(mtype, &iconpath);
     return iconpath;
 }
 
@@ -179,9 +180,8 @@
     // Add dynamic "stored" fields to the full column list. This
     // could be protected to be done only once, but it's no real
     // problem
-    RclConfig *config = RclConfig::getMainConfig();
-    if (config) {
-	const set<string>& stored = config->getStoredFields();
+    if (rclconfig) {
+	const set<string>& stored = rclconfig->getStoredFields();
 	for (set<string>::const_iterator it = stored.begin(); 
 	     it != stored.end(); it++) {
 	    if (o_displayableFields.find(*it) == o_displayableFields.end()) {
@@ -488,7 +488,7 @@
     if (m_model->getDocSource()->getDoc(index.row(), doc)) {
 	textBrowser->clear();
 	m_detaildocnum = index.row();
-	m_pager->displayDoc(index.row(), doc, m_model->m_hdata);
+	m_pager->displayDoc(rclconfig, index.row(), doc, m_model->m_hdata);
     }
 }