fixed a few profiling errors