The rowIndex is set at the wrong place