Bug fix with looking up pin numbers by pin number