fix invalid preferredUnit value