Lerping Field Of View is buggy

I have ths script that is supposed to make the camera’s FoV to change when you press the right mouse button and return to normal when you release it.
The problem is that it never reaches neither 40 or 60 degrees completely, and after 1-2 presses, it stops working. Any help?

#pragma strict
var cam : Camera;
var weapon : Transform;

function Update () {
	if(Input.GetMouseButtonDown(1))
	{
		weapon.animation.Play("GunAim");
		CamFovChange(40);
	}
	if(Input.GetMouseButtonUp(1))
	{
		weapon.animation.Play("GunAimEnd");
		CamFovChange(60);
	}
}

function CamFovChange(amount : int) {
	while(cam.fieldOfView != amount)
	{
		cam.fieldOfView = Mathf.Lerp(Camera.main.fieldOfView, amount, 10*Time.deltaTime);
		yield;
	}
}

That’s not really how lerp should be used. Actually it’s not even needed here.

#pragma strict

var cam : Camera;
var weapon : Transform;
var targetFov : float = 60;

function Update () {
	if(Input.GetMouseButtonDown(1))
	{
		weapon.animation.Play("GunAim");
		targetFov = 40;
	}
	if(Input.GetMouseButtonUp(1))
	{
		weapon.animation.Play("GunAimEnd");
		targetFov = 60;
	}
	         
	cam.fieldOfView = Mathf.MoveTowards(cam.fieldOfView, targetFov, 10*Time.deltaTime);
}

ScriptReference - Mathf.Lerp

ScriptReference - Mathf.MoveTowards