Some permission fixes