Closes #165
Fix with/without test when undefined
Merge branch 'master' into bug-168