fixed buffer overflow