Fixed profiling bug