Fix for Issue #182

Possible fix for issue #182.
Tests are a bit ugly since we have to emit the error a few levels deep, but there may be a better way to rspec around that.  Comments and test changes welcome.