first since your M40 is in the sub 10k serial range check to see if it has the upgraded trigger.
The M's originaly had an 8kb trigger and when they switched to a 5lb trigger they offered free upgrades.
The pin that runs through the trigger sideways (acts as a hinge for the inner triiger) should be about halfway up the trigger, if it is only 1/3 of the way up from the bottom you have an old style trigger.
Some M9's have extraction issues, though most don't. I would HIGHLY suggest a thorough cleaning following the links and tutorials here, including removing the extractor.
not to be the smarty pants, but that pin has no relation to the trigger safety. the trigger safety slides horizontally within the trigger.
that roll pin is the place where the trigger bar connects to the trigger. and moving it (thus changing leverage on the trigger bar) was one of the ways steyr lightened the trigger, the other way was removing a preload spacer from the firing pin spring.