Fixed the hex conversion to handle single-digit conversions.