Fix image loading bug.