Fix to add arrays correctly