Fix memory correctness in overlap stat plugin