Fix buffer overflow.