Mass air flow sensor ford expedition 2001 Eddie

I have replace my mass airflow sensor in my ford expedition 2001 Eddie triton and it still falls on it face once in a while and run horribly on idle, so bad that I couldnt turn the wheel without giving it gas. But i can take the MAF out and it runs and does not die but weather its in or not I get bank 1 and bank 2 lean codes and anyone give me pointers