Syntax warning fixes.
Fixed nonce calculation