well if playing with the plug fixed it then that could've been the problem.
- get yourself a fine flat screwdriver and carefully prise the metal clip off the plug.
- look at the plug and see if the terminals are dirty on both sides.
- you can spray contact/carby cleaner in there to make it better, or alternatively scrape the metal with your screwdriver to clear the shit off.
Make sure you put the metal clip back over the plug or it will fall off when you're sitting at the lights in heavy traffic just to give you the shits.