Fix num_pins, class variable scope