Fix support on different Python versions