Make Python 3 safe