bugfix for tokens