fix long query position bug when use with cache tool.