Some refinements to get_pka()