Correct the validation of the public key

Also fixed a silly mistake in deploy.py (shhh)