fixed missing unicode in py3
fixed missing basestring in py3