prevent encoding issues

this ensures hex conversions are not manipulated