fix a timing issue in a profiler test
fix a possible side effect checking issue