Fix data overflow problem