fix owerflow problem