Problem with obstacle avoidance robot code.

I have made my first little obstacle avoiding robot. This is actually my first project with an arduino. I am having a little trouble with my code but I don’t know exactly in which part of the code that is causing the problem. When the robot is less than 13 inches away from something then it stops and looks left and right to get the greatest distance. It then turns in the direction of the greatest distance. Up until this point the code works correctly. Instead of the robot moving forward and going in that direction, it starts looking left and right again. Here is the code, it is pretty short and should be easy to read. Thanks in advance for any help.

#include <Servo.h> 

Servo servo; 
const int trigPin = 3;
const int echoPin = 2;
const int LeftMotorForward = 7;
const int LeftMotorBackward = 5;
const int RightMotorForward = 10;
const int RightMotorBackward = 8;
const int E1 = 6;  
const int E2 = 11;

unsigned int LeftDistance;
unsigned int RightDistance;
 
void setup() 
{
    servo.attach(4); 
    servo.writeMicroseconds(1350);
    pinMode(LeftMotorForward, OUTPUT);
    pinMode(LeftMotorBackward, OUTPUT);
    pinMode(RightMotorForward, OUTPUT);
    pinMode(RightMotorBackward, OUTPUT);
    pinMode(E1, OUTPUT);
    pinMode(E2, OUTPUT);
    analogWrite(E1, 165); // speed of left motor. For some reason this motor turns a bit slower than the other motor.
    analogWrite(E2, 140); // speed of right motor 
    delay(3000);  // Wait 3secs before running 
}
 
void loop()
{
  
 servo.writeMicroseconds(1350);
 
 int i;
 i=scan();
 
 if(i > 13) 
 {
   Forward();
 }
 else
 {
   Stop();
   delay(400);
   navigate();
 }
 delay(100);
}

long microsecondsToInches(long microseconds)
{
  return microseconds / 74 / 2;
}

int scan()                                         //This function determines the distance things are away from the ultrasonic sensor
{
  long duration, inches;
  pinMode(trigPin, OUTPUT);
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  pinMode(echoPin, INPUT);
  duration = pulseIn(echoPin, HIGH);
  inches = microsecondsToInches(duration);
  return inches;
}

void Forward()                                    //This function tells the robot to go forward 
{
  digitalWrite(LeftMotorBackward, LOW);
  digitalWrite(LeftMotorForward, HIGH);
  digitalWrite(RightMotorBackward, LOW);
  digitalWrite(RightMotorForward, HIGH);
}

void Backward()                                  //This function tells the robot to move backward
{
  digitalWrite(LeftMotorForward, LOW);
  digitalWrite(LeftMotorBackward, HIGH);
  digitalWrite(RightMotorForward, LOW);
  digitalWrite(RightMotorBackward, HIGH);
}

void Right()                                      //This function tells the robot to turn right
{
  digitalWrite(LeftMotorForward, LOW);
  digitalWrite(LeftMotorBackward, HIGH);
  digitalWrite(RightMotorBackward, LOW);
  digitalWrite(RightMotorForward, HIGH);
  
}

void Left()                                    //This function tells the robot to turn left
{
  digitalWrite(LeftMotorBackward, LOW);
  digitalWrite(LeftMotorForward, HIGH);
  digitalWrite(RightMotorForward, LOW);
  digitalWrite(RightMotorBackward, HIGH);
}

void Stop()                                     //This function tells the robot to stop moving
{
  digitalWrite(LeftMotorBackward, LOW);
  digitalWrite(LeftMotorForward, LOW);
  digitalWrite(RightMotorForward, LOW);
  digitalWrite(RightMotorBackward, LOW);
}

void navigate()
{
   servo.writeMicroseconds(2250);
   delay(1000);
   LeftDistance = scan();
   servo.writeMicroseconds(600);
   delay(1000);
   RightDistance = scan();
     if(LeftDistance > RightDistance)
       {
         Backward();
         delay(450);
         Right();
         delay(350);
         Stop();
         delay(400);
         servo.writeMicroseconds(1350);
         delay(400);
       }
       else
       {
         Backward();
         delay(450);
         Left();
         delay(350);
         Stop();
         delay(400);
         servo.writeMicroseconds(1350);
         delay(400);
       }
}

Fixed the problem, I guess I should have put more thought into this before posting. I wasn't turning the robot far enough to get back to more than a 13 inch range. I guess I just have to much stuff in my house for it to run into lol. I am still wondering what I could do to get the robot to backup in case one of the wheels gets stuck on something like a chair leg. Is there a way to measure how much current a dc motor is drawing? I am assuming that the motors draw more current when they are stalled/stuck.

Is there a way to measure how much current a dc motor is drawing?

Since you can't drive a motor directly from the Arduino, the real question is "Does my shield provide a way to...". Since you haven't said which shield, the answer is maybe.

Yeah sorry about that. I am just using a l293d on a mini breadboard. I have been reading about using encoders on the motors, I believe that would probably be my best choice. I have one motor that turns slow, I should be able to fix that problem.