Fixed: check image is intact before loading it; reported by @wangjiezhe