added some robustness conditions to fail gracefully when client is not configured