fixes to Test-UIAControlState and Wait-UIAControlState cmdlets