fixed bug for users with newer python versions