more str/bytes fixes, unittest compat