Fix buffer overrrun