fixed an overflow issue