Fix bug in with_perf when block returns.
Merge pull request #1 from yp-engineering/bug_fixes

Fix bug in with_perf when block returns.