Issue with SMC05A

Hi, I just got my hands on SMC05A. All seems kosher while no load (motors) is connected to the controller. The leds respond as expected to forward/reverse, speed settings. However once the load is connected (Tamiya high speed gearboxes) one of the motors stops responding to commands (leds for that motor stop working as well) at speeds above certain threshold. Below is a sample test code I use replicate the issue, the motors will go back in force until reaching certain speed, after which motor1 stops responding all together until the entire circuit is reset. Checking the forums I can see that noise could be an issue and I am about to get on my way to pick up some capacitors for the motors (don’t have any now) to see if this helps. Any other ideas would be greatly appreciated.

unsigned char buff[4];
void setup()  { 
  // Reset the motor controller on startup
  pinMode(13, OUTPUT);      // sets the digital pin as output
  digitalWrite(13, LOW);
  digitalWrite(13, HIGH);

void loop() { 
  buff[0]=0x80;//start byte
  buff[1]=0x00;//device type
  for (unsigned char speed = 0; p < 127; p ++) {
     for (unsigned char direction = 0; j < 2; j ++) {
        buff[3] = speed;
        for (unsigned char motor = 2; k < 4; k++) {
           buff[2] = motor * 2 + direction;
           for(int i=0;i<4;i++){
       // let the motors spin for a second

  // repeat after two seconds