OK, check this out (disregard switch pinouts):
When you have your dc power plugged in, the middle (battery+) and the lower (circuit 9v) are not connected, your circuit gets power from the top and lower lug and the positive battery pole is disconnected.
Once you disconnect the jack, plug internally shortcircuits the middle and lower lug, effectively connecting your board positive potential with the positive battery pole.
Is this how you have it connected?