correct the saving order of cells, fixes #12