Fixup trace func