Fixed profiler support (and some other stuff).