fixed refs to index