Fix bug #5280 - imperial units not working properly