Fix a logic error which cause tag not rendered.