still works in unfederated context, with a bug fix: