fix corrupt images