Fix session index bug after reduction