fixed counting row_num