fix wait for images