Fixed buffer overrun (similar to the previous fix)