Workaround AssertionError with Python 3.4