Bytes/str issue fixed to work in python 2.6.