Repairs

[profiler]
Memory usage: real: 12582912, emalloc: 9008344
Code ProfilerTimeCntEmallocRealMem