WiFly + Motor Shield

I am working on a robot that uses a WiFly module and the Ardumoto motor shield as well as an Arduino Uno. I am transferring UDP packets from an app on my phone to the WiFly to communicate with the motor shield. The WiFly is connected in infrastructure mode and I have 4 DC motors driving a chassis. The problem that I am having is that every time I try to run a sketch that involves the DC motors on my robot and the WiFly, 2 of the motors (from the same side) begin to run without a command telling them to run. I was able to do some debugging and think the problem may be with the command WiFly.begin(). I am not sure what is the exact purpose of this command, but it acted like an on/off switch for any sketch that I tried, not allowing any sketch to function when it was commented out. If anyone has an idea as how to resolve this issue, or has any advice, it would be much appreciated.

/*

#include "WiFly.h"
#include "Credentials.h"
#include "SPI.h"

int pwm_a = 3;  //PWM control for motor outputs 1 and 2 is on digital pin 3
int pwm_b = 11;  //PWM control for motor outputs 3 and 4 is on digital pin 11
int dir_a = 12;  //direction control for motor outputs 1 and 2 is on digital pin 12
int dir_b = 13;
int pos = 90;

WiFlyServer server(7778);

void setup() {
 
  pinMode(pwm_b, OUTPUT);  
  pinMode(pwm_a, OUTPUT);
  pinMode(dir_b, OUTPUT);
  pinMode(dir_a, OUTPUT);
  analogWrite(pwm_b, 0);  
  analogWrite(pwm_a, 00);

  
  WiFly.begin();
  if (!WiFly.join(ssid, passphrase)) {
    while (1) {
      // Hang on failure.
    }
  }

  Serial.begin(9600);
  Serial.print("IP: ");
  Serial.println(WiFly.ip());
  
  server.begin();
}

void loop() {
  

  WiFlyClient client = server.available();
  if (client) {
    while (client.connected()) {
      //if (client.available()) {
        char c = client.read();
        Serial.print(c);
        
         while(c == 'F'){ // forward
            digitalWrite(dir_a,LOW);
            analogWrite(pwm_a, 200);
            digitalWrite(dir_b,HIGH);
            analogWrite(pwm_b, 200);
            Serial.println(c);
            Serial.println("Moving Forward");
             client.read();
            }  
    }
    client.stop();
  }
}