Fixes basestring for PY3