Spark when key is turned to the off position?

I had an issue recently and it was a bad ground on the ignition module. I ran a ground wire to the mounting screw from the firewall.