fixed endless recursion --> stack overflow