Fix bug when resetting the lattice