done handler takes object than url as string. fix waiting for image content to be loaded before switching