Three issues with profiling code