Fix hex length check