move nonce check earlier