fixed another bug in the schema discovery code