fix schema indexing for models