fixed is_pin_available