fixes mock_server crashing when trying to send a query to an invalid instance id