Fix bug where not setting private key causes crash

empty privateKey caused EXC_BREAKPOINT