small fixes, but we are about to hunt a nondeterministic timing bug in
so start adding more logging in...