fix: sorting of cells was in the incorrect place