Fixed issue with index