Fix waitForElement