assuming its a 2jGE vvti? if so, is MAF sensor plugged in? Sounds to be more of a fuel problem to me, before dropping in motor, did you take apart motor? mainly the fuel rail or injectors? If so, the O-rings on the injectors maybe be bad or may have fallen out. A similar problem happened to a friend of mine, turns out one injector was missing an O-ring and as soon has he starts, motor starts to back fire and stalls. Hope this helps in some way! Good luck,