Fix syntax for appending elements to a collection