Use the preference for units.
Fixed logging and displaying of units.