Programming Arduino Uno with XBee Attached

Hey All,

I am trying to figure out an easy way to program my Arduino Uno while my XBee Pro is connected to the 5V, GND, TX, and RX ports. I can program the Arduino fine when I remove the module. However, when I try to program the Arduino when the module is connected, I get a:

avrdude: stk500_getsync(): not in sync: resp=0xe0

Is there any way to "close" the four ports the XBee is connected to at the end of my program so I can program the Arduino without having to disconnect the XBee.

Any help is much appreciated! Thanks!

Joe