fix exception overflow check