Minimum requirement: Python 2.7
Fix some errors in Python 3