Fix issue with indexes