Fix buffer overflow : Issue #1