Fixing hex parsing