fix stdout trimming.