I don't think you need this .waitForImages() call, it seems to work fine without it. What does it do?