some permission fixes