Fixed Memory Allocation Bug in ReadLattice