permission bugfix