removes empty [] from children