make tests green for python 2

Two small fixes to make tests pass in python 2.7