Fix the bug in error output