stop unsetting rules iterate key inside recursive method