fixed a bug in LZW