I need to correct the verb in this sentence.

If we would have had the engine tuned, I'm sure we would not be stranded on the highway now.

Is this correct?

If we had had the engine tuned, I'm sure we would not be stranded on the highway now.

Yes, correct.