removes empty formulae