No spark vertical cylinder pantah

Puzzling over a strange fault on a 350 pantah engine. There is no spark on the upright cylinder while running - BUT the plug does spark momentarily just as the engine is turned off. This happens whether turned off at the key, or the bar switch. Any ideas what’s wrong??

Just recently sorted same type of problem by accident. It turned out that when i tried to adjust mixture on carburetor the screwdriver touched the frame and created a spark. After detaching the throttle cables the problem was still there, then detaching the choke cable the problem disappeared. Now we were getting somewhere,but the choke body was live and after taking apart the warning light assembly we discovered 2 loose terminals which was the problem. Hope this may help you as it took us ages to find because all electrics were working fine which threw us off track.Some of the problemms we encountered was backfiring through the carbs and exhaust. Good luck.

Thanks that’s a good tip. I’ll check it out