Fixed bug in resizing of internal buffer for limited viewing