fixup! add global distinct support