remove empty clauses in metadata