Bug fix in assignTokens()