Nonce mechanism tweaked for correctness.