Fixed bug where empty lists were added to solution.