fix for older versions of py3