Turning off motors if Serial Communication fails

Heres what I have so far:

if (Serial.available ())

  {

    processInput ();

    last = millis();

  }

  else 
  {

    current = millis();

    if (current-last > interval)

    {
      digitalWrite(M1A, LOW);
      digitalWrite(M1B, LOW);
    }

It still will not shut off the motor, what am I missing?