fixed index first row bug