Fix for issue #66
Merge commit 'pull/67'
improved error message and fixed test, refs #62