Merge "Miscellaneous profiling fixes"