fix issues in image from URL code