fix permission of flag