Fix potential crash, display pubkeyalgo