remove recursion bug