fix  hex decoding