fixing the index