fix bytes -> string conversion error in python3