adding fix and unit tests for cloud-engine-api scariest