Fix platform calculation.