fixed infinite recursion bug between add and addAll