fix some token bugs