Parallax Joystick problems with the motor shield.

I am using a Arduino Motor Shield and a Parallax Joystick to control the speed of a motor, using PWM. At first I started out with reading the values of the joystick, or the potentiometer, using the serial monitor with expected values of 0 - 1023. When I use the motor shield and have the pot plugged into analog 0 the values I get range from, 0 - 35 and then jumps to about 550ish, so completely wrong values. Now when I remove the motor shield I get the expected values, 0 - 1023. This doesn’t make sense because the pin analog pins on the motor shield are not used on the shield, it is essentially the same pin as on the actually Arduino. Im I wrong about that? Do I need to be using the pin headers?

Here is my code.

int PotPin = A0;
int PotVal = 0;
int MotorSpeed = 0;


void setup() 
{
 
 //pinMode( PotPin, INPUT)
 Serial.begin(9600); 
  
}

void loop() 
{
  
  int PotVal = analogRead(A0);
  
  MotorSpeed = map(PotVal, 0, 1023, -255, 255);
  
  Serial.println(PotVal);
    
  if (MotorSpeed > 0) 
  {
    
    digitalWrite(12, HIGH); //Establishes forward direction of Channel A
    digitalWrite(9, LOW);   //Disengage the Brake for Channel A
    analogWrite(3, MotorSpeed);   //Spins the motor on Channel A at full speed
    
  }
  
  else if(MotorSpeed < 0)
  {
    
    digitalWrite(12, LOW); //Establishes backward direction of Channel A
    digitalWrite(9, LOW);   //Disengage the Brake for Channel A
    analogWrite(3, MotorSpeed);   //Spins the motor on Channel A at full speed
 
  }
  
}

Here is a picture of how I have it wired up.
https://photos-1.dropbox.com/t/0/AACNrecoIhd-i8dGXES2gfUll582_FNDVgt3Z0tpkwfotw/12/149419336/jpeg/32x32/3/_/1/2/20130806_162904.jpg/8hu_J3sG9isvq5vZzoTz7PqAIE7txJFzKGBmMDrzrxY?size=1024x768

connor1868:
Here is a picture of how I have it wired up.
https://photos-1.dropbox.com/t/0/AACNrecoIhd-i8dGXES2gfUll582_FNDVgt3Z0tpkwfotw/12/149419336/jpeg/32x32/3/_/1/2/20130806_162904.jpg/8hu_J3sG9isvq5vZzoTz7PqAIE7txJFzKGBmMDrzrxY?size=1024x768

Clicking on that link results:
Error (403)
It seems you don’t belong here! You should probably sign in. Check out our Help Center and forums for help, or head back to home.

So, you’re saying that running that sketch above, without the motor shield plugged results a fair range of analogReads, but plugging it in makes that part go wobbly?