bugfix in api causing runtime error in python 3