Fixed bug where profiler would display multiple times when called during the shutdown callback