Fixed the duplicate nonce generation