Anytime you disconnect your battery the first step is to disconnect the negative cable from the battery. When hooking one up the last step is to connect the negative cable to the battery. You can buy a disconnect switch which is nothing more than an arm which you swing one way or the other. Was it running at the same speed or was the engine percolating after you shut it off?