Space Shooter: Enemy is not dodging

Hello,
I have a problem with Space Shooter turtorial. I have no error untill i start the game and enemy needs to dodge. Under the turtorial i can see the script even copy pasted it and still nothing :/.

NullReferenceException: Object reference not set to an instance of an object
EvasiveManeuver.FixedUpdate () (at Assets/_script/EvasiveManeuver.cs:42)

public float dodge;
public float smoothing;
public float tilt;
public Vector2 startWait;
public Vector2 maneuverTime;
public Vector2 maneuverWait;
public Boundary boundary;

private float currentSpeed;
private float targetManeuver;
private Rigidbody rb;

void Start ()
{
	currentSpeed = rb.velocity.z;
	rb = GetComponent <Rigidbody> ();
	StartCoroutine (Evade ());
}

IEnumerator Evade()
{
	yield return new WaitForSeconds (Random.Range (startWait.x, startWait.y));

	while (true)
	{
		targetManeuver = Random.Range (1, dodge) * -Mathf.Sign (transform.position.x);
		yield return new WaitForSeconds (Random.Range (maneuverTime.x, maneuverTime.y));
		targetManeuver = 0;
		yield return new WaitForSeconds (Random.Range (maneuverWait.x, maneuverWait.y));
	}
}

void FixedUpdate ()
{
	float newManeuver = Mathf.MoveTowards (rb.velocity.x, targetManeuver, Time.deltaTime * smoothing);
	rb.velocity = new Vector3 (newManeuver, 0.0f, currentSpeed);
	rb.position = new Vector3 
		(
			Mathf.Clamp (rb.position.x, boundary.xMin, boundary.xMax),
			0.0f,
			Mathf.Clamp (rb.position.z, boundary.zMin, boundary.zMax)
		);

	rb.rotation = Quaternion.Euler (0.0f, 0.0f, rb.velocity.x * -tilt);
}

I was able to fix this by making rb a public variable, and referencing the Enemy Ship’s rigid body in the rb slot.

public Rigidbody rb;

For some reason Unity will not automatically assign the rigid body component associated with the Enemy Ship instance to rb. Instead, what appears to be happening is that the command

rb = GetComponent ();

assigns the generic rigid body object class. However, once rb is a public variable referencing the Enemy Ship’s rigid body, this assignment command assigns the rigid body instance to rb.