Fixed a bug in Profiler

Signed-off-by: crynobone <crynobone@gmail.com>