fix bytes calculation on buf_increase