corrected buffer overflow