fix loading images with empty sources