diff --git a/scribus/prefsmanager.cpp b/scribus/prefsmanager.cpp
index 383704b04..6299dfb70 100644
--- a/scribus/prefsmanager.cpp
+++ b/scribus/prefsmanager.cpp
@@ -2351,40 +2351,34 @@ bool PrefsManager::ReadPref(const QString& ho)
 		if (dc.tagName()=="PageSets")
 		{
 			QDomNode PGS = DOC.firstChild();
-			if  (!PGS.namedItem("PageNames").isNull())
+			appPrefs.pageSets.clear();
+			while (!PGS.isNull())
 			{
-				appPrefs.pageSets.clear();
-				while (!PGS.isNull())
+				QDomElement PgsAttr = PGS.toElement();
+				if(PgsAttr.tagName() == "Set")
 				{
-					QDomElement PgsAttr = PGS.toElement();
-					if(PgsAttr.tagName() == "Set")
+					struct PageSet pageS;
+					pageS.Name = PgsAttr.attribute("Name");
+					pageS.FirstPage = PgsAttr.attribute("FirstPage", "0").toInt();
+					pageS.Rows = PgsAttr.attribute("Rows", "1").toInt();
+					pageS.Columns = PgsAttr.attribute("Columns", "1").toInt();
+					pageS.pageNames.clear();
+					QDomNode PGSN = PGS.firstChild();
+					while (!PGSN.isNull())
 					{
-						struct PageSet pageS;
-						pageS.Name = PgsAttr.attribute("Name");
-						pageS.FirstPage = PgsAttr.attribute("FirstPage", "0").toInt();
-						pageS.Rows = PgsAttr.attribute("Rows", "1").toInt();
-						pageS.Columns = PgsAttr.attribute("Columns", "1").toInt();
-//						pageS.GapHorizontal = PgsAttr.attribute("GapHorizontal", "0").toDouble();
-//						pageS.GapVertical = PgsAttr.attribute("GapVertical", "0").toDouble();
-//						pageS.GapBelow = PgsAttr.attribute("GapBelow", "0").toDouble();
-						pageS.pageNames.clear();
-						QDomNode PGSN = PGS.firstChild();
-						while (!PGSN.isNull())
-						{
-							QDomElement PgsAttrN = PGSN.toElement();
-							if(PgsAttrN.tagName() == "PageNames")
-								pageS.pageNames.append(PgsAttrN.attribute("Name"));
-							PGSN = PGSN.nextSibling();
-						}
-						appPrefs.pageSets.append(pageS);
-						if ((appPrefs.pageSets.count() == appPrefs.docSetupPrefs.pagePositioning) && ((appPrefs.displayPrefs.pageGapHorizontal < 0) && (appPrefs.displayPrefs.pageGapVertical < 0)))
-						{
-							appPrefs.displayPrefs.pageGapHorizontal = ScCLocale::toDoubleC(PgsAttr.attribute("GapHorizontal"), 0.0);
-							appPrefs.displayPrefs.pageGapVertical   = ScCLocale::toDoubleC(PgsAttr.attribute("GapBelow"), 40.0);
-						}
+						QDomElement PgsAttrN = PGSN.toElement();
+						if(PgsAttrN.tagName() == "PageNames")
+							pageS.pageNames.append(PgsAttrN.attribute("Name"));
+						PGSN = PGSN.nextSibling();
+					}
+					appPrefs.pageSets.append(pageS);
+					if ((appPrefs.pageSets.count() == appPrefs.docSetupPrefs.pagePositioning) && ((appPrefs.displayPrefs.pageGapHorizontal < 0) && (appPrefs.displayPrefs.pageGapVertical < 0)))
+					{
+						appPrefs.displayPrefs.pageGapHorizontal = ScCLocale::toDoubleC(PgsAttr.attribute("GapHorizontal"), 0.0);
+						appPrefs.displayPrefs.pageGapVertical   = ScCLocale::toDoubleC(PgsAttr.attribute("GapBelow"), 40.0);
 					}
-					PGS = PGS.nextSibling();
 				}
+				PGS = PGS.nextSibling();
 			}
 		}
 
