Add an overflow check, just in case.