Fix function tracing