Fixes around permissions