Actually corrected overflow check (thanks rockihack)