Fix changing protection permissions