Fixed permissions level checks that were causing errors