fixing the creating index with mappings