fix bug when query record