fix private key computation