Which version of Pd and on which operating system?
Can't say for sure what's up, one long-standing issue with Mac and Windows PD is that PD has never had a proper software midi interface between the app and the system. What it does have is a hack-in that will connect PD midi to - at maximum - the first nine ports on the system's midi port list and nowhere else. ATM only ALSA MIDI on linux has anything close to a fully interfaced PD midi to system buss.
To get full access to the max available midi porting on Mac/Win you have to start with all midi ports on the system deactivated. You then have to use 3d party midi patching software such as Midi Patchbay on Mac (don't use IAC leave it deactivated) or an equivalent Windows program to create nine virtual midi ports to occupy those first eight slots on the system list. Start PD and connect it to the nine virtual ports. Activate all the other midi ports/devices that you need on the system, then use the patching software to do the actually midi routing to external software and devices.
If the above sounds ridiculous -- it is! Supposedly this is actually being worked on (finally) but it requires a major rewrite of badly botched coding. Most of the Pd coders don't really "get" midi and the few that do haven't been very active since they contributed the ALSA code. Take it from someone who has written multiple midi synth editors with Pd-- there's a reason I prefer PureData on linux.