Usually when you disconnect the MAF the system goes into a default running mode and substitutes the sensor reading with a static value which in fact most of the time allows the car to run smoother than if connected...which is also a good diagnosis to prove that the sensor is defective.
You could try cleaning it and see how that works (carb cleaner and Q-Tips tends to work)