WaitFor now uses the correct rest URL to check the state