fix completing, validation was wrong, wrap xf if given as function

add a real test for `completing`, the validation was wrong