diff --git a/db/db.py b/db/db.py
index <HASH>..<HASH> 100644
--- a/db/db.py
+++ b/db/db.py
@@ -1235,7 +1235,7 @@ class DB(object):
         sys.stderr.write("Refreshing schema. Please wait...")
         if self.schemas is not None and isinstance(self.schemas, list) and 'schema_specified' in self._query_templates['system']:
             schemas_str = ','.join([repr(schema) for schema in self.schemas])
-            q = self._query_templates['system']['schema_specified'] % str(self.schemas)
+            q = self._query_templates['system']['schema_specified'] % schemas_str
         elif exclude_system_tables==True:
             q = self._query_templates['system']['schema_no_system']
         else:
Fix for schema_specified  case in refresh_schema