Handle index(n) correctly.