Fixed problem with row index