fix resize bug where monitor output is truncated