Fix waitForSelector