token logic tweak