replacing a couple of problem pieces trying to debug profiling