Lattice/model search bug fixed