fixed test, and error reporting