Fixed bug where client was not set