bug fixed

fixed the buffer overflow bug