fix permission bake script