Prevent buffer overrun