fix index i->j