C# Skips some lines, why?

I have an if statement. When it is true the next two lines of code are skipped.
I’ve added the relevant code, When this is true the setControlState statement is skipped and the myGoal assignment is also skipped. When debugging I can see that myGoal is indeed still idle. Why is this happening?

cps = myControlPoint.GetComponent<ControlPointScript>();
if (cps.getControlState() == controlPointStates.Uncontrolled)
{
    cps.setControlState(controlPointStates.Claimed);
    myGoal = goals.controlling;
    myControlState = controlStates.moveingToControlPoint;
}     

public controlPointStates getControlState()
{
    return myState;
}

I think the best way to find it is to put a Break point on if line and go through the code to find the problem.
maybe one of your function is disabling this script.

I think both left and right parts of the if statement resulted in a “True” the solution was to remove the function and the right hand side (I’m blanking on what it’s called right now) from the if statement

controlPointStates zaq;
controlPointStates wsx;
zaq = cps.getControlState();
wsx = controlPointStates.Claimed;
if (zaq == wsx)