Fixed addLattice method