More bytestring handling fixes