fix bug in retrievelattice api