Fix Python versions compatibility issue.