Fix recurrent bug on permissions