Fix reference to non-existing index