fix permission setting