Fixed bug that throws an exception when the console output has more lines
than the buffer. Still limited to Int16.MaxValue-1 lines