Fixed crash with old version of Python