added check for 0 deployments returned