Fix iterator visit, Improve profiling