Corrected ambiguous overflow check