save the emptied rules first