fix problems with trailing incomplete hex sequence
fix: str2num did not convert hex values correctly