Corrected ToHex

Hex values are now correct.