Fix infinite recursion issue