finish bufferquery