Mathf.Clamp does not work at all.

I am using C# and I am trying to clamp a velocity value that will increase when I press down on my accelerate button. The code is as follows:

if (Input.GetKey(KeyCode.W))
            currentVelocity += forwardAccelerationRate * Time.deltaTime;
            maxVelocity = 50.0f;
        else if (Input.GetKey(KeyCode.S))
            currentVelocity += reverseAccelerationRate * Time.deltaTime;
            maxVelocity = 10.0f;
            currentVelocity -= deccelerationRate * Time.deltaTime;

        currentVelocity = Mathf.Clamp(currentVelocity, initialVelocity, maxVelocity);
        Debug.Log(Mathf.Clamp(currentVelocity, initialVelocity, maxVelocity));


initialVelocity = 1.0f;
currentVelocity = 0.0f;
maxVelocity = 5.0f;
forwardAccelerationRate = 2.0f;
reverseAccelerationRate = 0.5f;
deccelerationRate = 0.7f;

My currentVelocity variable just continues to increase no matter what.

Mathf.Clamp works 100%. What other code do you have that is affecting the variables?
I’d suggest

 Debug.LogFormat("currentVelocity: {0}   initialVelocity: {1}    maxVelocity: {2}", currentVelocity, initialVelocity, maxVelocity);

for a closer inspection of all of the variables.