fix a bug introduded by PR#1 in loading private keys (segv/mem corruption)