Motor Shield weird behavior: cannot control two motors on same side

Hi, I am new to this, maybe I'm making an obvious mistake. I am trying to build a 2-wheel drive car with two motors controlled independently. This should be quite simple using this code:

#include <AFMotor.h>
AF_DCMotor motor1(1,MOTOR12_64KHZ);
AF_DCMotor motor2(2,MOTOR12_8KHZ);
 
void setup() {
  motor1.setSpeed(105); //set the speed of the motors, between 0-255
  motor2.setSpeed(105);  
}
 
void loop() {
    motor1.run(FORWARD);
    motor2.run(FORWARD);  
}

What is weird is that the code above does not work, only one motor runs. The only way I was able to have both motors run was when I moved one of them physically to the other side of the shield (M3 or M4), and changed the third line of my code to AF_DCMotor motor2(3,MOTOR12_8KHZ);

Does this make any sense? Is my shield bad? or am I misunderstanding how to use this part "MOTOR12_8KHZ"??

Thanks!

For informed help, post a hand drawn (not Fritzing) wiring diagram and links to the motors, motor shield and library.

I use the standard motor shield that fits on top of Arduino Uno (http://www.ebay.com/itm/Motor-Drive-Expansion-Shield-Board-Module-L293D-For-Arduino-Duemilanove-Mega-UNO-/322066862948?hash=item4afcae5364)

I think I figured it out: I had other wires connected to other pins on arduino, and I squeezed in the motor shield on top of all of them. After I removed all the clutter it now works well.

Thanks!

Expecting an L293D to work at 64kHz is rather optimistic, its a darlington driver, and 64kHz is very
high even for a MOSFET H-bridge.

You should be using the define DC_MOTOR_PWM_RATE, not any of the _xKHZ low level defines as
they are board-specific.)