fix regression in #131

close #148
fix the fix
Merge pull request #149 from gurneyalex/fix-expected-error-regression

fix regression in #131