The first thing I would check would be the switch, check that it is working properly, You may have fitted a old switch that works but is on its way out or it could have burnt out the contacts inside. Try jumping the two terminals on the back of the switch and see it the engine shuts down. If not then you could have a bad ground connection. Try taking the coils ground wire off and cleaning the terminals with some light grit sand paper. Also try bypassing the switch for the time being and try shutting the engine down by holding the coils ground wire directly against the frame (be careful of the high voltage and of the sparks if you have fuel near by).
A side note: This should be in the Electrical category.