Fix output in Python 3