Fix problem with saving empty custom rules element.