Fix function replacement example