Fixed rule edit/delete issues