Cast collection to array before merge

Fix #205