I have had this same problem since I connected my fan and in line temp switch for the tranny cooler. If the switch activates for the cooler when I shut off the truck, the engine keeps running for about 15 seconds. I figure I have picked power from the wrong power wire. I have also wired up a manual switch for the fan. If I put the switch on, the truck runs until I turn off the switch to the tranny cooler fan. Been doing this about a year now.