fix bug: double index