Merge of various fixes from the tng headers.