Corrections in edge-case output in Deployments API

Change-Id: I88ab00ceb227a97b3955d0d8d379b2a7fad4918b