RC Vehicle With Xbee Does Not Move

Hello everyone, i am new to arduino and i am trying to make an RC car.
I have used arduino UNO, Xbee S1, Xbee Shield v03 and Motor Driver L293D shield.
So the problem i am facing is that when i insert motor driver shield’s pin directly to the arduino it works properly when i send a command using serial monitor, i mean the motors perform as they are supposed to.
Whereas when i stack up the motor driver shield on Xbee shield and insert the Xbee shield on the Arduino UNO then there’s no response from motor when i send the command using Serial monitor on Arduino IDE.
This is the code of my vehicle, its pretty basic but as i am new so i am having some problem in understanding what i am doing wrong.

#include <AFMotor.h>
#include <SoftwareSerial.h>

AF_DCMotor motor1(1);
AF_DCMotor motor3(3);

char xbee;
void setup()
{
  Serial.begin(9600);
  pinMode(0,INPUT);
  analogReference(DEFAULT);
  motor1.setSpeed(255);
  motor3.setSpeed(255);
  Stop();
}

void loop()
{
  xbee=Serial.read();

if(xbee=='F')
{
 forward(); 
}

if(xbee=='B')
{
 backward(); 
}

if(xbee=='L')
{
 left(); 
}

if(xbee=='R')
{
 right(); 
}

if(xbee=='S')
{
 Stop(); 
}
  
}
void forward()
{
     motor1.run(FORWARD);
}

void backward()
{
     motor1.run(BACKWARD);
}
void left()
{
     motor3.run(BACKWARD);
}
void right()
{
    motor3.run(FORWARD);
}
void Stop()
{
  motor1.run(RELEASE);
  motor3.run(RELEASE);
}

Any help is highly appreciated. Thankyou.

Most likely, stacking the shields leads to a wiring problem. Post links to the exact shields.