remove empty list items after submitting form