Better error report and fixed syntax error in a test case