Terminal resizing bug fix.