fix overflow problem when insert function returned value larger than int32