Fixed two potential overflows resulting from large console buffers in windows.