Fix waitForX