Fixed critical permission bug