Bugfix

Memory issue in graph/lattice constructor.