Idle help

Ok guys i have a problem, usually my car idles fine, but there was a cone filter on the car(eBay), and i removed it, removed the resonator, and installed the stock intake box,an k&n filter, and lastly reinstalled the piping which runs toward the resonator, and behind the headlight. The funny thing is the car doesn’t idle properly anymore, lets say it doesn’t idle at all. It will starts fine, but right a way it just gets to the 200’s rpms and stuff and starts jumping like to 300rpms and higher as if the car is trying to revive it self, but shortly after dies. Now the funny part which leads me to my thought, “the car is not getting enough airflow” is becuase when i close the hood i get the problem, but when i open it, it idles smoother than ever as i also cleaned 4 grounds, so i was wondering what is your thought about this problem.

1989 240sx
Ka24e
Automatic

Im not sure if this would help, but if i reset the ecu by taking of the ground would it help the system to understand whats going on? Just a guess, flamers.

and are the ka24e sensor that connects to the airbox the same as the ka24de?

IACV.

also theres another air sensor beside the maf.
name escapes me right now but make sure its there and pointed in the right direction.

where is IACV valve on the ka24e?

fixed it. Maf to airbox connection needed to be tightened. Um but i was wondering what is the normal idle rpm?

^^^normal would somewhere from 800-1100