Fix Python 2 failures