fix a overflow problem