Fixing wiener's private key generation, plus random errors.