A) Tap it about half way out, tap vertically to give a VERY slight bend, tap it back into place.
B) Tap it back into place, throw a dab of clear nail polish over the pin holes at each end. (Can use loctite on the end too, but nail polish is easier to remove if you want to change it later).
C) Tap it back into place, throw a bit of a peen/stake against both ends.
Most often, I use option A.