modify error display and add the test case