Fix when collection is an array