fix the bug of crashing mcf when tracing enabled