Fix hex debugging function.