Fix client.sh to support multiple concurrent instances