fix invalid image