fix in show-lattice && saving lattice for debug