^^^ Contamination OR… the parts are not being held still which causes the molecules to dull as they harden. That's likely Rule #2 with all things soldering…
ALWAYS make sure you have something to hold your leads and/or components so you don't find yourself playing HOT POTATO literally which forces you to remove the hold prematurely. As marine6680 stated though, you can straighten your solder and dip it straight in and out of flux to give it an additional hint of flux.
ALWAYS keep in mind that flux's main job is to assist in carrying maximum heat throughout the entire bead of solder. What I recommend is what I do… Place a small glob of flux on the leads prior to applying solder so that when you introduce the solder, maximum heat is achieved instantaneously so you touch the portion you're tinning and let cool. Then when you are ready to solder the wires on, touch the wire to the flux so it has a tiny bit of flux on it and then apply another tiny bead of flux to the tinned point. This way when you touch your iron's tip to the joint to be, the wire heats up instantly, and when the lead touches the flux on the tinned point, it causes the tin to melt so it all becomes a singular component.
I'm sure we've all seen "soldered" joints separate on some peoples' cars where the solder cracks where the 2 components meet and you can see how the solder between the wire and the contact point never melted. Doing it the way I just explained will prevent that from happening 100% of the time.
Hope this helps.