fix bug in HTMLCodec