Fixed mistake in checking nonce length