Your bulb terminals likely aren't making contact within the headlight plug. Your pigtail connections may be wearing down some. Try spreading out or pushing closer the terminals on the bulb a bit so that the terminals on the bulb are tighter fit in the plug.