Fixed bug with the output method of a List field

There is a bug with the output method of the List class. While iterating over the list the value assigned to the List class is passed to the container instead of the actual value of the element in the list.