CLOUDIFY-1791 Fixed stateless and stateful deployments