bugfix for python27