Fix: Wait for client to stop