I would pull the module and get it tested at Auto Zone or Advance. Warm it up with a hair dryer first.
The pickup in the distributor will cause this type of problem like turning the key on and off.
Your better off with Motorcraft parts. Google Thexton distributor tool if you change the pickup.
These are common problems on Ford's.