fixed public key error & fixed syntax error

Client will not blow up if no PUBLIC_KEY is present or None is supplied