 				[SentMessages] = @sentMessagesCount,
 				[ReceivedMessages] = @receivedMessagesCount,
 				[ConnectedGatewayCount] = @connectedGatewaysCount
+			WHERE
+				([DeploymentId] = @deploymentId AND @deploymentId IS NOT NULL)
+				AND ([ClientId] = @clientId AND @clientId IS NOT NULL);
 		END
 		ELSE
 		BEGIN	

				SentMessages = @sentMessagesCount,
				ReceivedMessages = @receivedMessagesCount,
				LoadShedding = @isOverloaded,
				ClientCount = @clientCount;
		END
		ELSE
		BEGIN

/*
Project Orleans Cloud Service SDK ver. 1.0
 
Copyright (c) Microsoft Corporation
