small edits to work with python 2.7, regarding encoding