You don't give us the engine make and model numbers, so this is only a guess. Check to see if the fuel shutoff solenoid is working properly. It is located on the bottom of the carb and has one or two wires connected to it. With one hand on the solenoid, turn the key to the run (not start) position. You should hear a click and be able to feel if the solenoid kick in. If nothing happens your solenoid may be sticking or bad, causing your problem.