fixed creating index