fixed bad index;