fix adding rules issue