fixed a bug when rendering keywords with complex characters