Fixes inversion between trace and context