fix check permission