Fix types in sparse