improve waiting for image