Fixed "RuntimeError: maximum recursion depth exceeded while calling a Python object"