fixed oveflow problem