Fixed some errors regarding Permissions