Fix tracing and graphing bugs