Bugfix: add missing namespace definitions in the lattice code