fix permission bug