Fix unit tests for profiling