fixing bugs in qdigest