Fixed setting permissions