fix error rank type