Fix recursion protection