Fix error display bug in generate part.