Changed overflow logic