Fix image replacement