problem with connecting UART to XBee using xbee shield

I am using an Arduino Uno, Xbee series 1, and a shield to interface between the Arduino and the XBee radio. This is the shield that I'm using, it's from sparkfun: SparkFun XBee Shield - WRL-12847 - SparkFun Electronics

The shield was designed with a switch which you can toggle to select your XBee to connect with either the UART(pins 0 and 1 for TX and RX) or any other two digital pin which you can configure the TX and RX to be. For some reason however, whenever I choose toggle the switch to UART and have the TX and RX of the XBee, my code does not upload to the board and I get this error:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x2d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x2d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x2d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x2d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x2d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x2d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x2d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x2d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x2d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x2d
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

When I configure it to connect to the digital pins, it seems to upload just fine and only when I try to configure it to connect to the UART the above error arises.

I read post on instructables that a possible reason for this error is connecting a wire to pin 0. For example:

Cause #0: Wire coming out of pin 0, (RX)

All credit goes to tvance929 and his comment below for finding this one. Some people seem to have this happen to them so it seems worth it to bring this up top here.

Apparently this issue will also occur if you have a wire connected to pin 0 (RX) on the Arduino.

However, this does not address how the shield should be used when it's designed to feature pins 0 and 1 connected to the shield.

or any other two digital pin which you can configure the TX and RX to be.

No. The switch lets you choose pins 0 and 1 or pins 2 and 3.

For some reason however, whenever I choose toggle the switch to UART and have the TX and RX of the XBee, my code does not upload to the board and I get this error:

Of course. That's why there is a switch. It eliminates the need to remove the shield.

I read post on instructables that a possible reason for this error is connecting a wire to pin 0.

That is what you are doing when the switch is in the UART position.

However, this does not address how the shield should be used when it's designed to feature pins 0 and 1 connected to the shield.

How the shield is used after you upload code and how the shield is used while you upload code are two different things.

If the shield is going to be in place while you upload code, the switch can not be in the UART position. If the shield is not going to be in place while you upload code, the position of the switch does not matter.

PaulS:
If the shield is going to be in place while you upload code, the switch can not be in the UART position. If the shield is not going to be in place while you upload code, the position of the switch does not matter.

This fixed it, thanks.