fix for old python versions