Use '%x' instead of hex() which is less predictable in OCRA implementation