improved error message and fixed test, refs #62