Fix topindex.