Fix image crash