Fix bugs in deployment/undeployment messaging.
Send error message for invalid deployment type.