Update token permissions bugfix