Fixed some bugs concerning MaterializedLattice