Fix a overflow bug in SetTotalBytesLimit