Properly clean up if rules fail validation