bugfix for permissions