Python 2 fix (@henriquegemignani )