fix overflow issue without shim