buffer overflow fixed