Fix issue with deploy API

Change-Id: I0424babe8a6386b057215a1d9e7a0fa188e4c0cc