Commit some bug fixes for index creation