fix endless recursion