A few more fixes for the str -> bytes conversion.