Attempt to fix invalid hex string errors