fixed a bug(buffer overflow)