Resolve image loading bug