now handles corrupt images