fix for old versions of python