Fix error in permissions checking classes