Fixed failing Python 3 tests.