rearranged the logic in array loop to fix
Merge branch 'upload-destination-config'