getElementsByUIAutomation empty array fix