fix a buffer overflow.