backport 5.6/7.0 tokens