fixing bytes/str issues