Fixed a problem when adding multiple values to a collection