corrections to hex parsing