Fixed some problems with index.