Fix 6-character hex encoding