updatePermissions() is now finally working! :D