Fixed mod 0 error in the snapshotting code