fix some discrepancies to RFC6120/6121/6122