Automatic Stacking Issues

I am trying to program a function that stacks and backs out. This should not be hard at all, but it is giving me problems.

if (BarMotor.position(rotationUnits::deg) > 0 and BarMotor.position(rotationUnits::deg) < 86 and StackRelease.position(rotationUnits::deg) > 1600) {

Brain.Screen.print("Retracting...");
Brain.Screen.newLine();
StackRelease.rotateTo(120, rotationUnits::deg,100, velocityUnits::pct, false);
SpitOut(5);
driveDistance(-15, 100);

} else {

BarMotor.rotateTo(85, rotationUnits::deg, 100, velocityUnits::pct, true);
Brain.Screen.print("Retracting...");
Brain.Screen.newLine();
StackRelease.rotateTo(120, rotationUnits::deg,100, velocityUnits::pct, true);

}

Even though the if statement returns true for the condition, it does not want to run the functions: SpitOut(double revolutions); and driveDistance(float distance, double rotations);. SpitOut's waitForCompletion is false so that driveDistance can run while SpitOut is running. my teammate and I tried to add a task::sleep function to see if it just needed to wait but that did not work. We are stumped as to why this is so hard to figure out and why this is even giving us a problem in the first place.