Transposed the conversion of hex to decimal