Thanks to samrg472 for pointing it out, I have fixed some things in Permissions, and make code a lot more efficient