Many things come to mind - timing is not amongst them.
First - what rpm is it running at when you switch it off - if it's at high rpm, it may do that.
Second - what carb are you using (and where are you)? Stock carb should have an "anti-diesel" solenoid that cuts the fuel through the idle circuit when the ignition power goes off - of course, this has little effect it it's not at idle (see #1 above)
Third - excessive carbon build up in the chambers can cause hotspots which ignite the fuel air mixture without a spark, but, if the throttle is closed and it's the stock carb, the anti-diesel solenoid cuts the fuel and the engine dies (see #1 & #2 above).