Fix logic for multiple deployment providers

In cases where people have an array of deployment providers with only
a single element the current logic would break. This change fixes that.