Made recursion detection not suck