2003 Bravada.4.2

Finally got around to changing thermostat (0128 code) went fairly smooth other than looking for lower housing bolt that fell and hid, went in thru left wheel well after removing tire to remove and replace it.. Problem now is it surges and stalls at times at idle or low rpm surge, but code is out and none resetting. Could I have knocked something loose, was not a problem before thermostat replacement, and of course you need to unhook battery ? Will recheck area tomorrow for loose wires or vacuum leak. Wondered if anyone else had this problem. Zeke