fix refactoring from #836
Merge pull request #873 from github/debug

fix refactoring from #836