I got the feeling the ref wasn't totally committed to the foul call that led to the free kick in the first place, so he was looking for a reason to erase any goal from the free kick.
But that's football, as they say. Or soccer in this case.
Horrible first half from the US though, Slovenia deserved a result today.