Remove empty lists in the end