Make rule selection more robust, fix selector count.