fix passing a client in not working