Unit type conversion fix