fixing bug getting section index by row index