wip: token bugfixing