fix for different python versions