diff --git a/pgadmin/schema/pgCheck.cpp b/pgadmin/schema/pgCheck.cpp
index 183348e..51e1dfb 100644
--- a/pgadmin/schema/pgCheck.cpp
+++ b/pgadmin/schema/pgCheck.cpp
@@ -234,7 +234,7 @@ pgObject *pgCheckFactory::CreateObjects(pgCollection *coll, ctlTree *browser, co
 	{
 		while (!checks->Eof())
 		{
-			check = new pgCheck(collection->GetSchema(), checks->GetVal(wxT("conname")));
+			check = new pgCheck(collection->GetSchema()->GetSchema(), checks->GetVal(wxT("conname")));
 
 			check->iSetOid(checks->GetOid(wxT("oid")));
 			check->iSetDefinition(checks->GetVal(wxT("consrc")));
diff --git a/pgadmin/schema/pgDomain.cpp b/pgadmin/schema/pgDomain.cpp
index a3308bd..fefd133 100644
--- a/pgadmin/schema/pgDomain.cpp
+++ b/pgadmin/schema/pgDomain.cpp
@@ -286,7 +286,7 @@ pgObject *pgDomainFactory::CreateObjects(pgCollection *collection, ctlTree *brow
 	{
 		while (!domains->Eof())
 		{
-			domain = new pgDomain(collection->GetSchema(), domains->GetVal(wxT("domname")));
+			domain = new pgDomain(collection->GetSchema()->GetSchema(), domains->GetVal(wxT("domname")));
 
 			domain->iSetOid(domains->GetOid(wxT("oid")));
 			domain->iSetOwner(domains->GetVal(wxT("domainowner")));
diff --git a/pgadmin/schema/pgForeignKey.cpp b/pgadmin/schema/pgForeignKey.cpp
index 72f0af8..8a03ed1 100644
--- a/pgadmin/schema/pgForeignKey.cpp
+++ b/pgadmin/schema/pgForeignKey.cpp
@@ -306,7 +306,7 @@ pgObject *pgForeignKeyFactory::CreateObjects(pgCollection *coll, ctlTree *browse
 	{
 		while (!foreignKeys->Eof())
 		{
-			foreignKey = new pgForeignKey(collection->GetSchema(), foreignKeys->GetVal(wxT("conname")));
+			foreignKey = new pgForeignKey(collection->GetSchema()->GetSchema(), foreignKeys->GetVal(wxT("conname")));
 
 			foreignKey->iSetOid(foreignKeys->GetOid(wxT("oid")));
 			foreignKey->iSetRelTableOid(foreignKeys->GetOid(wxT("confrelid")));
diff --git a/pgadmin/schema/pgIndex.cpp b/pgadmin/schema/pgIndex.cpp
index 206bc51..ba36469 100644
--- a/pgadmin/schema/pgIndex.cpp
+++ b/pgadmin/schema/pgIndex.cpp
@@ -566,18 +566,18 @@ pgObject *pgIndexBaseFactory::CreateObjects(pgCollection *coll, ctlTree *browser
 			switch (*(indexes->GetCharPtr(wxT("contype"))))
 			{
 				case 0:
-					index = new pgIndex(collection->GetSchema(), indexes->GetVal(wxT("idxname")));
+					index = new pgIndex(collection->GetSchema()->GetSchema(), indexes->GetVal(wxT("idxname")));
 					break;
 				case 'p':
-					index = new pgPrimaryKey(collection->GetSchema(), indexes->GetVal(wxT("idxname")));
+					index = new pgPrimaryKey(collection->GetSchema()->GetSchema(), indexes->GetVal(wxT("idxname")));
 					((pgPrimaryKey *)index)->iSetConstraintOid(indexes->GetOid(wxT("conoid")));
 					break;
 				case 'u':
-					index = new pgUnique(collection->GetSchema(), indexes->GetVal(wxT("idxname")));
+					index = new pgUnique(collection->GetSchema()->GetSchema(), indexes->GetVal(wxT("idxname")));
 					((pgUnique *)index)->iSetConstraintOid(indexes->GetOid(wxT("conoid")));
 					break;
 				case 'x':
-					index = new pgExclude(collection->GetSchema(), indexes->GetVal(wxT("idxname")));
+					index = new pgExclude(collection->GetSchema()->GetSchema(), indexes->GetVal(wxT("idxname")));
 					((pgExclude *)index)->iSetConstraintOid(indexes->GetOid(wxT("conoid")));
 					break;
 				default:
