Fix behaviour of command client when it encounters errors.
Tune timeouts and polling.