Backing up using three wire motor encoders

void driveshort( int ti,int dist) {
//RESET
Brain.Timer.reset();
double ipd = 28.7;
int dist2 = dist * ipd;

Enleft.setPosition(0, degrees); 
Enright.setPosition(0, degrees); 

while(ti > Brain.Timer.value() && ((Enleft.position(degrees) + Enright.position(degrees))/2)  < dist2){

int slowdown = (dist2/8) * 2;
int speedup = (dist2/4);

if(dist2 > 0){
  if(((Enleft.position(degrees) + Enright.position(degrees))/2)  < slowdown && ((Enleft.position(degrees) + Enright.position(degrees))/2) > speedup){

    FrontL.spin(directionType::fwd, 65,velocityUnits::pct);
    BackL.spin(directionType::fwd, 65,velocityUnits::pct);
    FrontR.spin(directionType::rev, 65,velocityUnits::pct);
    BackR.spin(directionType::rev, 65,velocityUnits::pct);

  }
  if(((Enleft.position(degrees) + Enright.position(degrees))/2) > slowdown || ((Enleft.position(degrees) + Enright.position(degrees))/2) < speedup){

    FrontL.spin(directionType::fwd, 30,velocityUnits::pct);
    BackL.spin(directionType::fwd, 30,velocityUnits::pct);
    FrontR.spin(directionType::rev, 30,velocityUnits::pct);
    BackR.spin(directionType::rev, 30,velocityUnits::pct);

  }
}


if(dist2 < 0){
  if(((Enleft.position(degrees) + Enright.position(degrees))/2)  > slowdown && ((Enleft.position(degrees) + Enright.position(degrees))/2) < speedup){

    FrontL.spin(directionType::rev, 65,velocityUnits::pct);
    BackL.spin(directionType::rev, 65,velocityUnits::pct);
    FrontR.spin(directionType::fwd, 65,velocityUnits::pct);
    BackR.spin(directionType::fwd, 65,velocityUnits::pct);

  }
  if(((Enleft.position(degrees) + Enright.position(degrees))/2) > slowdown || ((Enleft.position(degrees) + Enright.position(degrees))/2) < speedup){

    FrontL.spin(directionType::rev, 30,velocityUnits::pct);
    BackL.spin(directionType::rev, 30,velocityUnits::pct);
    FrontR.spin(directionType::fwd, 30,velocityUnits::pct);
    BackR.spin(directionType::fwd, 30,velocityUnits::pct);

  }
}


}

if (Enleft.position(degrees) + Enright.position(degrees)/2 || dist - 20) {

  FrontL.stop();
  FrontR.stop();
  BackL.stop();
  BackR.stop();

}
}

so I created this drive function using the three wire encoders and it is very accurate when going forward and it speeds up and slows down fine but for some reason when I tell it to go backwards it doesn’t move at all and is like it completely skips it in the auton phase. Does anyone know what could be happening or if I would just have to back up using time