Fixed buffer overflow corner case