Fixed handling of class-wide permits.