fixed crash related to image loading