Fixing potentialAttack stack overflows