fix more bugs for offlattice 2d part.